Skip to content

8297505: Declare fields in some sun.security.pkcs11 classes as final#11346

Closed
minborg wants to merge 1 commit intoopenjdk:masterfrom
minborg:pkcs11-final
Closed

8297505: Declare fields in some sun.security.pkcs11 classes as final#11346
minborg wants to merge 1 commit intoopenjdk:masterfrom
minborg:pkcs11-final

Conversation

@minborg
Copy link
Contributor

@minborg minborg commented Nov 24, 2022

This PR proposes declaring some fields as final to potentially unlock performance optimisations and improve thread visibility (e.g. for GC threads). The PR also fixes a "synchronising on a non-final field" anti-pattern.


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-8297505: Declare fields in some sun.security.pkcs11 classes as final

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11346

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 24, 2022

👋 Welcome back pminborg! 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 openjdk bot added the rfr Pull request is ready for review label Nov 24, 2022
@openjdk
Copy link

openjdk bot commented Nov 24, 2022

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

  • security

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 security security-dev@openjdk.org label Nov 24, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 24, 2022

Webrevs

@valeriepeng
Copy link
Contributor

I will take a look.

Copy link
Contributor

@valeriepeng valeriepeng left a comment

Choose a reason for hiding this comment

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

Looks fine. Have you run all the security regression tests? Or do you need me to run them?

@openjdk
Copy link

openjdk bot commented Dec 1, 2022

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

8297505: Declare fields in some sun.security.pkcs11 classes as final

Reviewed-by: valeriep

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

  • 84b927a: 8296024: Usage of DirectBuffer::address should be guarded
  • a9e6c62: 8297186: G1 triggers unnecessary full GCs when heap utilization is low
  • 4458de9: 8297172: Fix some issues of auto-vectorization of Long.bitCount/numberOfTrailingZeros/numberOfLeadingZeros()
  • a613998: 8297689: Fix incorrect result of Short.reverseBytes() call in loops
  • f8f4630: 8297963: Partially fix string expansion issues in UTIL_DEFUN_NAMED and related macros
  • 2a243a3: 8267617: Certificate's IP x509 NameConstraints raises ArrayIndexOutOfBoundsException
  • 923c746: 8298057: (fs) Remove PollingWatchService.POLLING_INIT_DELAY
  • 0bd04a6: 8297951: C2: Create skeleton predicates for all If nodes in loop predication
  • f5ad515: 8297247: Add GarbageCollectorMXBean for Remark and Cleanup pause time in G1
  • e975418: 8298102: Remove DirtyCardToOopClosure::_last_explicit_min_done
  • ... and 202 more: https://git.openjdk.org/jdk/compare/5b3d86f2296ec011f70cebe80a221b8a6f926912...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@valeriepeng) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 1, 2022
@minborg
Copy link
Contributor Author

minborg commented Dec 6, 2022

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 6, 2022
@openjdk
Copy link

openjdk bot commented Dec 6, 2022

@minborg
Your change (at version 1eed7c9) is now ready to be sponsored by a Committer.

@valeriepeng
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 12, 2022

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

  • c7aca73: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())
  • 781a2e0: 8298343: "Could not confirm if TargetJDK is hardened." warning for SA tests on macosx-aarch64-debug
  • 9ff85f6: 8298589: java/net/SctpSanity.java fail with NoClassDefFoundError: sun/nio/ch/sctp/UnsupportedUtil
  • 81f57d5: 8298567: Make field in RandomAccessFile final
  • 56c438b: 8297822: De-duplicate code in module jdk.sctp
  • fabda24: 8296389: C2: PhaseCFG::convert_NeverBranch_to_Goto must handle both orders of successors
  • 6c23b4f: 8298480: Remove unused KlassRemSet
  • 8e5c331: 8298471: Parallel: Don't keep alive nmethods in Young GC
  • d646e32: 8298090: Use String.join() instead of manual loop in DescriptorSupport.toString
  • a37de62: 8298126: Print statistics for objects in CDS archive heap
  • ... and 303 more: https://git.openjdk.org/jdk/compare/5b3d86f2296ec011f70cebe80a221b8a6f926912...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 12, 2022
@openjdk openjdk bot closed this Dec 12, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Dec 12, 2022
@openjdk
Copy link

openjdk bot commented Dec 12, 2022

@valeriepeng @minborg Pushed as commit c3bc4fc.

💡 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

integrated Pull request has been integrated security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants