Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JEP 486: Permanently Disable the Security Manager #20586

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Nov 13, 2024

Support JEP 486: Permanently Disable the Security Manager

JDK24 removes the following:

SecurityManager.invalidatePackageAccessCache();
SecurityManager.addNonExportedPackages(ml);
Access.allowSecurityManager();
Throw new AccessControlException() for
AccessControlContext.checkPermission() and
AccessController.javaAccessController.checkPermission();
AccessController.getContext() returns NO_PERMISSIONS_ACC;
Thread.inheritedAccessControlContext.

Originally included

Required by

Related to #20563

Signed-off-by: Jason Feng [email protected]

@JasonFengJ9 JasonFengJ9 requested review from pshipton and removed request for keithc-ca November 13, 2024 15:09
@pshipton
Copy link
Member

jenkins compile all jdknext depends ibmruntimes/openj9-openjdk-jdk#886

@pshipton
Copy link
Member

jenkins test sanity.openjdk amac jdk11

@pshipton
Copy link
Member

JDK24 removes following:
SecurityManager.invalidatePackageAccessCache();
SecurityManager.addNonExportedPackages(ml);
Access.allowSecurityManager();
Throw new AccessControlException() for
AccessControlContext.checkPermission() and
AccessController.javaAccessController.checkPermission();
AccessController.getContext() returns NO_PERMISSIONS_ACC;
Thread.inheritedAccessControlContext.

Signed-off-by: Jason Feng <[email protected]>
@pshipton
Copy link
Member

jdk11 failed

16:55:51  Exception in thread "main" java/lang/Error: bootstrap error, system property access before init: jdk.security.filePermCompat
16:55:51  	at java/lang/System.getProperty (java.base@11/System.java:609)
16:55:51  	at java/lang/System.getProperty (java.base@11/System.java:578)
16:55:51  	at sun/security/action/GetPropertyAction.privilegedGetProperty (java.base@11/GetPropertyAction.java:105)
16:55:51  	at java/security/ProtectionDomain.<clinit> (java.base@11/ProtectionDomain.java:68)
16:55:51  	at java/security/AccessController.<clinit> (java.base@11/AccessController.java:43)
16:55:51  	at java/lang/reflect/AccessibleObject.<clinit> (java.base@11/AccessibleObject.java:499)
16:55:51  	at jdk/internal/misc/Unsafe.objectFieldOffset1 (java.base@11/NativeMethod:4294967295)
16:55:51  	at jdk/internal/misc/Unsafe.objectFieldOffset (java.base@11/Unsafe.java:1392)
16:55:51  	at java/util/concurrent/ConcurrentHashMap.<clinit> (java.base@11/ConcurrentHashMap.java:6360)
16:55:51  	at java/util/Properties.<init> (java.base@11/Properties.java:207)
16:55:51  	at java/util/Properties.<init> (java.base@11/Properties.java:174)
16:55:51  	at java/lang/System.ensureProperties (java.base@11/System.java:421)
16:55:51  	at java/lang/System.afterClinitInitialization (java.base@11/System.java:225)
16:55:51  	at java/lang/Thread.initialize (java.base@11/Thread.java:375)
16:55:51  	at java/lang/Thread.<init> (java.base@11/Thread.java:162)

@pshipton
Copy link
Member

I guess that's before the recent change. I'll just re-run it,

jenkins test sanity.openjdk amac jdk11

@pshipton pshipton merged commit aadbf00 into eclipse-openj9:master Nov 15, 2024
5 checks passed
@JasonFengJ9 JasonFengJ9 deleted the disablesm branch November 15, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants