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

8344327: SM cleanup in jdk.unsupported ReflectionFactory #22158

Closed

Conversation

RogerRiggs
Copy link
Contributor

@RogerRiggs RogerRiggs commented Nov 15, 2024

This cleanup of the use of SecurityManager is in the jdk.unsupported module.
Removed the permission check to call getReflectionFactory().


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
  • Change requires CSR request JDK-8344423 to be approved

Issues

  • JDK-8344327: SM cleanup in jdk.unsupported ReflectionFactory (Bug - P4)
  • JDK-8344423: SM cleanup in jdk.unsupported ReflectionFactory (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22158

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Sorry, something went wrong.

Removed the permission check to call getReflectionFactory().
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 15, 2024

👋 Welcome back rriggs! 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 15, 2024

@RogerRiggs 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:

8344327: SM cleanup in jdk.unsupported ReflectionFactory

Reviewed-by: liach, mullan, alanb

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 89 new commits pushed to the master branch:

  • 499186b: 8343902: javax/swing/plaf/nimbus/8041642/bug8041642.java fails in ubuntu22.04
  • b12c5b4: 8344218: Remove calls to SecurityManager and and doPrivileged in java.net.NetworkInterface after JEP 486 integration
  • d85dd77: 8344365: SecurityManager cleanups in java.sql and java.sql.rowset modules
  • 9e92a9e: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module
  • 3729884: 8344371: RISC-V: compiler/intrinsics/chacha/TestChaCha20.java fails after JDK-8343555
  • dd86369: 8344262: Win32AttachOperationRequest objects are created by using global new
  • 5cb0d43: 8293040: Argfile documentation for java launcher tool is confusing regarding usage of wildcards
  • 8d43e0d: 8344331: SM cleanup in java.scripting
  • f636674: 8344247: Move objectWaiter field to VirtualThread instance
  • de6e013: 8344310: Remove Security Manager dependencies from javax.crypto and com.sun.crypto packages
  • ... and 79 more: https://git.openjdk.org/jdk/compare/752e1629555f0ec8630373ec87b049afdd709ea6...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 openjdk bot added the rfr Pull request is ready for review label Nov 15, 2024
@openjdk
Copy link

openjdk bot commented Nov 15, 2024

@RogerRiggs 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 15, 2024
Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Good. We might need a CSR as this changes API specification.

@mlbridge
Copy link

mlbridge bot commented Nov 15, 2024

Webrevs

@RogerRiggs
Copy link
Contributor Author

The jdk.unsupported module is not part of the specification.
The JEP and CSR covered the removal of the SM in general.

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Thanks. I think these are all to clean up in ReflectionFactory.

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

The CSR for JEP 486 included all the API changes for the supported APIs. With this PR we are in grey area of "critical internal APIs" that are undocumented. We have been doing CSRs whenever we remove these anything from jdk.unsupported, and more recently, the stop-gap work for serialization is adding methods that will be tracked by the CSR. I'm sure the CSR will approve this quickly.

@jddarcy
Copy link
Member

jddarcy commented Nov 16, 2024

/csr needed

@jddarcy
Copy link
Member

jddarcy commented Nov 16, 2024

The CSR for JEP 486 included all the API changes for the supported APIs. With this PR we are in grey area of "critical internal APIs" that are undocumented. We have been doing CSRs whenever we remove these anything from jdk.unsupported, and more recently, the stop-gap work for serialization is adding methods that will be tracked by the CSR. I'm sure the CSR will approve this quickly.

Yes; please run a quick CSR for this change. Thanks.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Nov 16, 2024
@openjdk
Copy link

openjdk bot commented Nov 16, 2024

@jddarcy has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@RogerRiggs please create a CSR request for issue JDK-8344327 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 16, 2024
@RogerRiggs
Copy link
Contributor Author

CSR created, please review: JDK-8344423

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Nov 18, 2024
@seanjmullan
Copy link
Member

What about sun.misc.Unsafe? There are a couple of AccessController.doPrivileged calls.

@RogerRiggs
Copy link
Contributor Author

What about sun.misc.Unsafe? There are a couple of AccessController.doPrivileged calls.

I'll look at that in a separate PR.

@seanjmullan
Copy link
Member

Is this worthy of a release note?

@AlanBateman
Copy link
Contributor

Is this worthy of a release note?

There are hundreds of methods changed to no longer do permission checks, remaining permission checks do nothing anyway. I would think the big release note for JEP 486 will provide an overall summary of the change.

@RogerRiggs
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 19, 2024

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

  • 59fcfae: 8343129: Disable unstable check of ThreadsListHandle.sanity_vm ThreadList values
  • 1717946: 8344302: G1: Refactor G1CMTask::do_marking_step to use smaller wrapper methods
  • fea5f2b: 8344415: Restruct jpackage utility classes
  • a28e4d8: 8342299: Document that jpackage includes (possibly old) VC Redistributable MSVCP140.dll from JDK
  • 0714114: 8344322: Improve capabilities of jpackage test lib to validate error output of jpackage
  • 41436bb: 8336087: Doccheck: the jpackage command page doesn't show the correct command-line options
  • cc8bd63: 8344036: Tests tools/jlink/runtimeImage fail on AIX after JDK-8311302
  • 2359736: 8344534: Remove leftover import of java.security.AccessControlContext in JavaLangAccess
  • 0d66689: 8344393: RISC-V: Remove option UseRVVForBigIntegerShiftIntrinsics
  • 7540fa2: 8343884: [s390x] Disallow OptoScheduling
  • ... and 92 more: https://git.openjdk.org/jdk/compare/752e1629555f0ec8630373ec87b049afdd709ea6...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 19, 2024

@RogerRiggs Pushed as commit ded01e4.

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

@RogerRiggs RogerRiggs deleted the 8244327-sm-reflectionfactory branch February 24, 2025 14:15
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.

None yet

5 participants