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 #787

Closed

Conversation

smita-kamath
Copy link

@smita-kamath smita-kamath commented Oct 12, 2022

Hi,

This is a backport of JDK-8292158: AES-CTR cipher state corruption with AVX-512. This backport fixes a bug where cipher can become corrupted when encrypting/decrypting byte arrays with a size less than 16.
The fix is in MacroAssembler::aesctr_encrypt method.

Patch does not apply cleanly to 17u as the method has moved from src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp to a new file src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp. The included regression test also had to be modified.

Could you kindly review the patch?

Thanks,
Smita


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/jdk17u-dev pull/787/head:pull/787
$ git checkout pull/787

Update a local copy of the PR:
$ git checkout pull/787
$ git pull https://git.openjdk.org/jdk17u-dev pull/787/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 787

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/787.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 12, 2022

👋 Welcome back svkamath! 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 changed the title Backport 9d76ac8a4453bc51d9dca2ad6c60259cfb2c4203 8292158: AES-CTR cipher state corruption with AVX-512 Oct 12, 2022
@openjdk
Copy link

openjdk bot commented Oct 12, 2022

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Oct 12, 2022
@smita-kamath smita-kamath marked this pull request as ready for review October 12, 2022 20:02
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 12, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 12, 2022

Webrevs

Copy link

@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.

@openjdk
Copy link

openjdk bot commented Oct 12, 2022

@smita-kamath 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

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

  • c8d5f9a: 8282402: Create a regression test for JDK-4666101
  • 58b4363: 8251466: test/java/io/File/GetXSpace.java fails on Windows with mapped network drives.
  • 96a5e40: 8281296: Create a regression test for JDK-4515999
  • 4a49294: 8284681: compiler/c2/aarch64/TestFarJump.java fails with "RuntimeException: for CodeHeap < 250MB the far jump is expected to be encoded with a single branch instruction"

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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) 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 Oct 12, 2022
@smita-kamath
Copy link
Author

/integrate

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

openjdk bot commented Oct 13, 2022

@smita-kamath
Your change (at version d4f60d5) is now ready to be sponsored by a Committer.

@smita-kamath
Copy link
Author

@vnkozlov, Thank you for reviewing this patch. Can you kindly sponsor it as well?

@vnkozlov
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 13, 2022

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

  • c8d5f9a: 8282402: Create a regression test for JDK-4666101
  • 58b4363: 8251466: test/java/io/File/GetXSpace.java fails on Windows with mapped network drives.
  • 96a5e40: 8281296: Create a regression test for JDK-4515999
  • 4a49294: 8284681: compiler/c2/aarch64/TestFarJump.java fails with "RuntimeException: for CodeHeap < 250MB the far jump is expected to be encoded with a single branch instruction"

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 13, 2022

@vnkozlov @smita-kamath Pushed as commit ac7d936.

💡 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
backport integrated Pull request has been integrated
2 participants