JDK-8334493 : Remove SecurityManager Permissions infrastructure from DiagnosticCommands.
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-06-18
  • Updated: 2024-11-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24Unresolved
Related Reports
Duplicate :  
Relates :  
Description
The native HotSpot diagnostic commands (DCmd, accessed via "jcmd") contain a 
JavaPermission (C++) object which describes a Java Permission  (almost always a ManagementPermission).

This is irrelevant after SecurityManager removal, and should be removed.


Comments
Notes on areas to visit and remove where possible: The class DCmd has the method: static const JavaPermission permission() All DCmd implementations need their permission information removed. class DCmdInfo does not need to contain JavaPermission information (JavaPermission definition to be removed). class DCmdFactory has a permission() accessor method which in DCmdFactoryImpl calls the DCmdClass::permission() src/hotspot/share/services/management.cpp defines jmm_GetDiagnosticCommandInfo This native management function returns an array of DCmdInfo from native to Java, populated from the native information including permissions. DiagnosticCommandMBean provides an interface to HotSpot DCmds, and is aware of the permission class. DiagnosticCommandImpl implements a Wrapper class, which takes a DiagnosticCommandInfo. The execute method performs a SecurityManager permisison check when appropriate.
18-06-2024