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

8292158: AES-CTR cipher state corruption with AVX-512 #9635

Closed
wants to merge 4 commits into from

Conversation

AJ-Ferguson
Copy link
Contributor

@AJ-Ferguson AJ-Ferguson commented Jul 26, 2022

Fix cipher state corruption when encrypting/decrypting less than 16 bytes at a time.


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-8292158: AES-CTR cipher state corruption with AVX-512

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9635

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 26, 2022

👋 Welcome back AJ-Ferguson! 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 26, 2022

@AJ-Ferguson The following label will be automatically applied to this pull request:

  • hotspot

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 hotspot hotspot-dev@openjdk.org label Jul 26, 2022
@AJ-Ferguson AJ-Ferguson changed the title Bug fix AES-CTR cipher with AVX-512 intrinsic 8292158 Aug 10, 2022
@openjdk openjdk bot changed the title 8292158 8292158: AES-CTR cipher state corruption with AVX-512 Aug 10, 2022
@AJ-Ferguson AJ-Ferguson marked this pull request as ready for review August 10, 2022 21:09
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 10, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 10, 2022

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Please, add regression test.

@robcasloz
Copy link
Contributor

Hi @AJ-Ferguson, please note that the JBS issue is assigned to @smita-kamath, who wrote the original implementation. Please check with Smita or other regular Intel contributors (e.g. @jatin-bhateja, @sviswa7) before moving forward with this changeset.

@smita-kamath
Copy link

@AJ-Ferguson, will take a look at the PR. Thank you.

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 12, 2022

@AJ-Ferguson This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@smita-kamath
Copy link

smita-kamath commented Sep 20, 2022

Hi @AJ-Ferguson, I have modified the changes you recommended and added a suggestion. Please have a look at the diff file and let me know what you think. Thanks.
diff.txt

@AJ-Ferguson
Copy link
Contributor Author

Hello @smita-kamath, thank you for taking the time to look at this PR. The changes you posted look good to me. I have added your improvements and updated the branch.

@sviswa7
Copy link

sviswa7 commented Sep 22, 2022

@AJ-Ferguson Please do add a test for this case.

@AJ-Ferguson
Copy link
Contributor Author

@sviswa7 @vnkozlov I have added the test. Please let me know if there are any issues.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good. I submitted testing.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Testing passed.

@openjdk
Copy link

openjdk bot commented Sep 27, 2022

@AJ-Ferguson 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:

8292158: AES-CTR cipher state corruption with AVX-512

Reviewed-by: kvn, svkamath, sviswanathan

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

  • 739fdec: 8289162: runtime/NMT/ThreadedMallocTestType.java should print out memory allocations to help debug
  • a11477c: 8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment
  • 7151128: 8294317: Insufficient build rules for tzdb.dat
  • fb4979c: 8290401: Support dump all phases and print nodes in ascending order of index
  • 112ca2b: 8293964: Unused check_for_duplicates parameter in ClassLoaderExt::process_jar_manifest
  • 99017b0: 8293064: Remove unused NET_xxx functions
  • 3419363: 8294361: Cleanup usages of StringBuffer in SQLOutputImpl
  • 1abf971: 8249627: Degrade Thread.suspend and Thread.resume
  • bc12e95: 8292969: Bad Thread Utilization in ForkJoinPool
  • dd51f7e: 8293996: C2: fix and simplify IdealLoopTree::do_remove_empty_loop
  • ... and 44 more: https://git.openjdk.org/jdk/compare/800e68d6906734242119e4ea033422f037a79857...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 (@vnkozlov, @sviswa7) 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 Sep 27, 2022
Copy link

@sviswa7 sviswa7 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 as well.

@AJ-Ferguson
Copy link
Contributor Author

Thank you for the reviews.

/integrate

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

openjdk bot commented Sep 27, 2022

@AJ-Ferguson
Your change (at version 8fc3e42) is now ready to be sponsored by a Committer.

@sviswa7
Copy link

sviswa7 commented Sep 28, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 28, 2022

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

  • e5b65c4: 8290482: Update JNI Specification of DestroyJavaVM for better alignment with JLS, JVMS, and Java SE API Specifications
  • f8d9fa8: 8294483: Remove vmTestbase/nsk/jvmti/GetThreadState tests.
  • 6ad151d: 8293143: Workaround for JDK-8292217 when doing "step over" of bytecode with unresolved cp reference
  • 22b59b6: 8294471: SpecTaglet is inconsistent with SpecTree for inline property
  • 763d4bf: 8293592: Remove JVM_StopThread, stillborn, and related cleanup
  • 739fdec: 8289162: runtime/NMT/ThreadedMallocTestType.java should print out memory allocations to help debug
  • a11477c: 8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment
  • 7151128: 8294317: Insufficient build rules for tzdb.dat
  • fb4979c: 8290401: Support dump all phases and print nodes in ascending order of index
  • 112ca2b: 8293964: Unused check_for_duplicates parameter in ClassLoaderExt::process_jar_manifest
  • ... and 49 more: https://git.openjdk.org/jdk/compare/800e68d6906734242119e4ea033422f037a79857...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 28, 2022
@openjdk openjdk bot closed this Sep 28, 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 Sep 28, 2022
@openjdk
Copy link

openjdk bot commented Sep 28, 2022

@sviswa7 @AJ-Ferguson Pushed as commit 9d76ac8.

💡 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
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
5 participants