[aarch64-port-dev ] JEP: 342: Limit Speculative Execution - on aarch64?
White, Derek
Derek.White at cavium.com
Tue Nov 20 22:12:34 UTC 2018
Hi porters,
Re - JEP 342: Limit Speculative Execution
https://bugs.openjdk.java.net/browse/JDK-8207206
JEP 342 proposes that we simply build an alternative "non-speculative" JVM by compiling with gcc options:
-mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register
These options are x86 only. I've asked Jesper to update the JEP to mention this.
I don't have a firm mapping in my mind between each Spectre variant and each mitigation, and the equivalency (or not) between the x86 and aarch64 mitigations, and what needs to be handled at user-level vs. in the kernel.
But it seems that JEP 342 is trying to mitigate Spectre variant 2, but aarch64 handles Spectre Variant 2 purely in kernel/firmware(?).
Are we safe then? Or do want to do anything special for building a non-speculative JVM for aarch64? Is the "-mtrack-speculation" option appropriate? Sufficient?
Thanks,
- Derek
BTW - The JEP also mentions that the JIT compilers will need to be updated similarly, but no details are given. This will also be cpu-specific (and potentially more work).
-----Original Message-----
From: White, Derek
Sent: Tuesday, November 20, 2018 4:43 PM
To: jdk-dev at openjdk.java.net; jesper.wilhelmsson at oracle.com
Subject: RE: JEP: 342: Limit Speculative Execution
Hi Jesper,
[Sorry for the "timely" response.]
Although the mechanisms for managing and identifying an alternative JVM are not platform-specific, the mitigation strategy proposed (e.g. the specific gcc options) are x86-specific.
I suggest adding a note in the JEP that the specific mitigations proposed are x86 specific, and that other ports will need to identify what mitigations are appropriate (if any).
I'll start up a discussion in the aarch64 list on what we should do about limiting speculative execution, and we may link aarch64-specific enhancements to this JEP. This needs to be looked at for both C++ options and JIT implementation on aarch64.
Thanks,
- Derek
> -----Original Message-----
> From: jdk-dev <jdk-dev-bounces at openjdk.java.net> On Behalf Of
> mark.reinhold at oracle.com
> Sent: Friday, September 07, 2018 1:53 PM
> To: jesper.wilhelmsson at oracle.com
> Cc: jdk-dev at openjdk.java.net
> Subject: New candidate JEP: 342: Limit Speculative Execution
>
> External Email
>
> http://openjdk.java.net/jeps/342
>
> - Mark
More information about the aarch64-port-dev
mailing list