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

8250902: Implement MD5 Intrinsics on x86 #806

Closed
wants to merge 4 commits into from

Conversation

phohensee
Copy link
Member

@phohensee phohensee commented Feb 3, 2022

I'd like to backport MD5 intrinsification because it improves security related performance. I understand that it may be a bridge too far for 11u. In that case we (Amazon) intend to backport it to our internal 11u distro followed by Corretto.

Testing: tier1, including the new and existing sha tests.

Ludovic Henry did an 11u backport in 2020 (see JDK-8251319), but I can't find a review request on the jdk-updates-dev list. My backport is essentially identical to his, and is based on the backport from jdk15u. It was not clean.

  1. Copyright date conflicts.
  2. Context differences.
  3. Changing SHAOptionsBase to DigestOptionsBase.
  4. Rewriting Assembler::roll() to use emit_int8() because emit_int16() and emit_24() don't exist in 11.

This backport would be immediately followed by a backport of JDK-8251260 to fix two tests. After that, I'd like to backport the aarch64 version in JDK-8251216.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/806/head:pull/806
$ git checkout pull/806

Update a local copy of the PR:
$ git checkout pull/806
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/806/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 806

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/806.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 3, 2022

👋 Welcome back phh! 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 339016a0f2cbbbbc3560e50c6726e14afbf547f6 8250902: Implement MD5 Intrinsics on x86 Feb 3, 2022
@openjdk
Copy link

openjdk bot commented Feb 3, 2022

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Feb 3, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 3, 2022

Webrevs

@lewurm
Copy link
Member

lewurm commented Feb 4, 2022

There was a proposal to backport it to 11u, but to the wrong mailing list: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-August/039412.html

I think it has baked enough on tip now 🙂 /cc @luhenry

Copy link
Member

@lewurm lewurm 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, but I'm not an official reviewer.

@phohensee
Copy link
Member Author

phohensee commented Feb 4, 2022

Ludovic's the original author, which is as "official" as it gets. Thanks for the review, Ludovic!

@phohensee
Copy link
Member Author

Thanks for the review, Bernhard!

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

Hi Paul,
thanks for doing this downport.
The changes look good except for one comment in CheckGraalIntrinsics.java
Best regards,
Volker

@@ -390,6 +390,11 @@ public CheckGraalIntrinsics() {
"jdk/jfr/internal/JVM.getEventWriter()Ljava/lang/Object;");
}

if (isJDK16OrHigher()) {
Copy link
Member

Choose a reason for hiding this comment

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

If we downport the MD5 intrinsic to JDK11, shouldn't this be changed to isJDK11OrHigher()?

private static boolean isJDK16OrHigher() {
return JavaVersionUtil.JAVA_SPEC >= 16;
}

Copy link
Member

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 need these checks here at all because the GraalVM in the JDK11 repository will probably never support JDK15 or 16.

@phohensee
Copy link
Member Author

Fixed, see incremental webrev. Thanks for the review!

Copy link
Member

@simonis simonis left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now.

@openjdk
Copy link

openjdk bot commented Feb 7, 2022

@phohensee This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8250902: Implement MD5 Intrinsics on x86

Reviewed-by: burban, luhenry, simonis

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 ready Pull request is ready to be integrated label Feb 7, 2022
@phohensee
Copy link
Member Author

Thanks, Volker. Tagged.

@phohensee
Copy link
Member Author

phohensee commented Feb 17, 2022

JBS issue was tagged 10 days ago. May I have a decision please? March 1st is 11.0.15 rampdown and quite close.

@phohensee
Copy link
Member Author

Backport rejected.

@phohensee phohensee closed this Feb 23, 2022
@phohensee phohensee deleted the backport-339016a0 branch February 24, 2022 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ready Pull request is ready to be integrated rfr Pull request is ready for review
4 participants