RFR: 8308503: AArch64: SIGILL when running with -XX:UseBranchProtection=pac-ret on hardware without PAC feature
Hao Sun
haosun at openjdk.org
Wed May 24 01:22:06 UTC 2023
On Wed, 24 May 2023 00:56:06 GMT, Hao Sun <haosun at openjdk.org> wrote:
>>> Virtual threads are proposed to be a permanent feature in JDK 21 so I assume predicating this on Arguments:enable_preview check no longer make sense.
>>
>> Oh, I **see**. So it really only makes sense either to make ROP protection work in vthreads, or just disable ROP protection in JDK 21.
>
>> I presume you didn't intend to change the logic here.
>
> @theRealAph I suppose the logic is not changed yet. `_rop_protection` is initialized as "false" at line 457.
>
> We enable it iff all the three conditions are satisfied at line 468.
> Otherwise, one warning message is emitted if any condition is not met, i.e., line 463, line 466 and line 471.
> Virtual threads are proposed to be a permanent feature in JDK 21 so I assume predicating this on Arguments:enable_preview check no longer make sense.
I knew this issue.
Initially I want to make this patch as small as possible, i.e. only focusing on the SIGILL issue.
> Oh, I see. So it really only makes sense either to make ROP protection work in vthreads, or just disable ROP protection in JDK 21.
It may take some more time for me to "make ROP protection work in vthreads", i.e. resolving JDK-8287325.
Compared to the zero modifier solution (See https://github.com/openjdk/jdk/pull/13322), I personally think relative sp solution is better, but we still have many jtreg failures to fix. I'm not sure if we can make it ready in JDK21 release cycle.
Perhaps, we can firstly disable ROP if `VMContinuations` is on. I mean, change `Arguments::enable_preview()` to `VMContinuations`.
In this way, ROP protection is enabled only with VM options `-XX:UseBranchProtection=standard|pac-ret -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations` on hardware with the support of PAC feature.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14095#discussion_r1203264803
More information about the hotspot-dev
mailing list