[jdk11u-dev] RFR: 8250902: Implement MD5 Intrinsics on x86

Volker Simonis simonis at openjdk.java.net
Mon Feb 7 10:28:16 UTC 2022


On Thu, 3 Feb 2022 20:19:10 GMT, Paul Hohensee <phh at openjdk.org> wrote:

> 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](https://bugs.openjdk.java.net/browse/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](https://github.com/openjdk/jdk15u-dev/pull/163). 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](https://bugs.openjdk.java.net/browse/JDK-8251260) to fix two tests. After that, I'd like to backport the aarch64 version in [JDK-8251216](https://bugs.openjdk.java.net/browse/JDK-8251216).

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

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java line 393:

> 391:         }
> 392: 
> 393:         if (isJDK16OrHigher()) {

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

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java line 556:

> 554:         return JavaVersionUtil.JAVA_SPEC >= 16;
> 555:     }
> 556: 

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.

-------------

Changes requested by simonis (Reviewer).

PR: https://git.openjdk.java.net/jdk11u-dev/pull/806


More information about the jdk-updates-dev mailing list