8390765: [PPC64] AES Crypto intrinsics may access memory beyond the key array - #32465
8390765: [PPC64] AES Crypto intrinsics may access memory beyond the key array#32465TheRealMDoerr wants to merge 1 commit into
Conversation
|
👋 Welcome back mdoerr! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@TheRealMDoerr The following label will be automatically applied to this pull request:
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. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
The old implementation of the AES stubs uses instruction sequences based on lvx and vperm instructions to handle unaligned accesses to the key array. Accesses beyond that array are possible (see JBS issue).
I've replaced the problematic sequences by instructions which can handle unaligned memory accesses. I'm using the better Power9 instructions if available and Power8 instructions else. (The AES intrinsics require Power8 as minimum.)
Note that Big Endian is much easier to handle because "lxvd2x, lxvw4x, lxvh8x, lxvb16x, and lxvx exhibit identical behavior in Big-Endian mode." (Power ISA).
No performance regression has been observed.
Also tested with -XX:+UnlockDiagnosticVMOptions -XX:PowerArchitecturePPC64=8
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32465/head:pull/32465$ git checkout pull/32465Update a local copy of the PR:
$ git checkout pull/32465$ git pull https://git.openjdk.org/jdk.git pull/32465/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32465View PR using the GUI difftool:
$ git pr show -t 32465Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32465.diff
Using Webrev
Link to Webrev Comment