RFR: 8371864: GaloisCounterMode.implGCMCrypt0 AVX512/AVX2 intrinsics stubs cause AES-GCM encryption failure for certain payload sizes [v8]

Shawn M Emery duke at openjdk.org
Wed Nov 26 05:21:54 UTC 2025


On Sun, 23 Nov 2025 04:54:15 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

>> Please review the fix in StubGenerator::aesgcm_avx512 and StubGenerator::aesgcm_avx2 to handle some edge cases with input sizes that are not multiple of the block size. 
>> 
>> Thanks to Thomas Holenstein and Lukas Zobernig for analyzing the issue and providing the test case!
>
> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed the ENCRYPT_16_BLKS fall through case that sviswa7 pointed out in PR review.

Was able to recreate the issue with the provided test case with messageSize 100101 before the fix and verified that the same test passed with the fix in place!  Will try to finish the code review shortly.

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

PR Review: https://git.openjdk.org/jdk/pull/28363#pullrequestreview-3508800232


More information about the hotspot-compiler-dev mailing list