Skip to content

8343982: Remove usage of security manager from ClassLoader and related classes #22097

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

Closed
wants to merge 3 commits into from

Conversation

AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Nov 14, 2024

Remove the code for the now defunct SecurityManager execution mode from ClassLoader and the built-in class loader implementations. The override of getPermissions is removed from the application class loader, and from the class loaders used to support module layers.

URLCassLoader (and its implementation URLClassPath) will be handled separately as there are spec changes required, and code in URLClassPath that requires special attention.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8343982: Remove usage of security manager from ClassLoader and related classes (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22097/head:pull/22097
$ git checkout pull/22097

Update a local copy of the PR:
$ git checkout pull/22097
$ git pull https://git.openjdk.org/jdk.git pull/22097/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22097

View PR using the GUI difftool:
$ git pr show -t 22097

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22097.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 14, 2024

👋 Welcome back alanb! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 14, 2024

@AlanBateman This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8343982: Remove usage of security manager from ClassLoader and related classes

Reviewed-by: jpai, yzheng, lancea

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 15 new commits pushed to the master branch:

  • 4d4951a: 8343889: Test runtime/cds/appcds/redefineClass/RedefineBasicTest.java failed
  • 697f27c: 8341964: Add mechanism to disable different parts of TLS cipher suite
  • 002b985: 8342963: TestLargeStub::testUpcall doesn't test upcalls stubs
  • e12f514: 8343781: Add since checker test to the Serviceability area modules
  • 7e9dfa4: 8343785: (fs) Remove syscalls that set file times with microsecond precision
  • 68164a4: 8343953: Test jdk/jfr/threading/TestDeepVirtualStackTrace.java fails with Parallel/Serial GC
  • 752e162: 8343877: Test AsyncClose.java intermittent fails - Socket.getInputStream().read() wasn't preempted
  • 4d1a51c: 8344120: Remove Security Manager dependencies from jdk.crypto.cryptoki module
  • a73226b: 8297692: Avoid sending per-region GCPhaseParallel JFR events in G1ScanCollectionSetRegionClosure
  • 6e28cd3: 8343488: Test VectorRebracket128Test.java can't exclude by test/hotspot/jtreg/ProblemList.txt
  • ... and 5 more: https://git.openjdk.org/jdk/compare/8523880f065efc8e0e527ddf2f14743fc0185593...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Nov 14, 2024

@AlanBateman The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Nov 14, 2024
@AlanBateman AlanBateman marked this pull request as ready for review November 14, 2024 09:10
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 14, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2024

Webrevs

@jaikiran
Copy link
Member

BootLoader.java and BuiltinClassLoader.java are missing a copyright year update.

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update to use findResourceOnClassPath() and the rest of the changes in this PR look good to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 14, 2024
Copy link
Contributor

@mur47x111 mur47x111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me Alan

@AlanBateman
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 15, 2024

Going to push as commit 0ae5748.
Since your change was applied there have been 22 commits pushed to the master branch:

  • 9907065: 8344065: Remove SecurityManager uses from the java.datatransfer module
  • db56266: 8344250: Obsolete the DontYieldALot flag
  • 7ef2633: 8344128: Regression: make help broken after JDK-8340818
  • d959c7d: 8344147: Remove Security Manager dependencies from java.security.sasl module
  • ec148c1: 8344063: Remove doPrivileged calls from swing classes in the java.desktop module
  • 2cbce1f: 8344071: Mark some jdk/jfr/event/oldobject test flagless until they fixed to support all GC
  • 681a57f: 8343064: ClassFormatError: Illegal class name from InnerClassLambdaMetafactory
  • 4d4951a: 8343889: Test runtime/cds/appcds/redefineClass/RedefineBasicTest.java failed
  • 697f27c: 8341964: Add mechanism to disable different parts of TLS cipher suite
  • 002b985: 8342963: TestLargeStub::testUpcall doesn't test upcalls stubs
  • ... and 12 more: https://git.openjdk.org/jdk/compare/8523880f065efc8e0e527ddf2f14743fc0185593...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 15, 2024
@openjdk openjdk bot closed this Nov 15, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 15, 2024
@openjdk
Copy link

openjdk bot commented Nov 15, 2024

@AlanBateman Pushed as commit 0ae5748.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants