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

8334772: Change Class::protectionDomain and signers to explicit fields #20221

Closed

Conversation

liach
Copy link
Member

@liach liach commented Jul 17, 2024

Please review this change that moves Class.protectionDomain and signers to explicit fields.

Related native methods in Class and AccessController::getProtectionDomain are converted to pure Java. These fields are still set and used by hotspot. Also fixes the incorrect protectiondomain_signature in vmSymbols, which is actually an array descriptor.

Note that these new fields are not filtered: filtering in early bootstrap requires other unrelated adjustments as we can't even use hashCode on String, and filtering is not proper encapsulation either.


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-8334772: Change Class::protectionDomain and signers to explicit fields (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20221

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

Using diff file

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

Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 17, 2024

👋 Welcome back liach! 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 Jul 17, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 17, 2024
@openjdk
Copy link

openjdk bot commented Jul 17, 2024

@liach The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot
  • security

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

@openjdk openjdk bot added security security-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Jul 17, 2024
@mlbridge
Copy link

mlbridge bot commented Jul 17, 2024

Webrevs

*/
ProtectionDomain protectionDomain(Class<?> c);
ProtectionDomain protectionDomain(Class<?> c, boolean raw);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should expose this outside of java.lang.

@AlanBateman
Copy link
Contributor

Offline discussion with Chen and I think the advice is to drop all the changes for ProtectionDomain for now. This area will change significantly as part of the SecurityManager removal work.

@liach liach closed this Jul 17, 2024
@liach
Copy link
Member Author

liach commented Jul 17, 2024

The migration of signers will be in a new PR. This patch will be kept so people will know the extra test updates related to migration of protectionDomain.

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 hotspot hotspot-dev@openjdk.org rfr Pull request is ready for review security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

None yet

2 participants