RFR: 8287325: AArch64: fix virtual threads with -XX:UseBranchProtection=pac-ret
Hao Sun
haosun at openjdk.org
Thu Apr 6 10:01:17 UTC 2023
On Thu, 6 Apr 2023 00:25:29 GMT, Dean Long <dlong at openjdk.org> wrote:
> Using SP seems like the right way to go. Can't we compute the correct SP value to use in Runtime1::generate_handle_exception()?
Thanks for your question, Dean.
Thinking more about it, I guess we can get the expected SP value.
In my local test, I always use `rfp + 16` to authenticate the return address, and test cases under `test/jdk/java/lang/Thread/` and `test/hotspot/jtreg/compiler/c2/` can pass except the `virtual thread` cases. I'm running tier1-3 now.
My concern is that **using absolute SP** is incompatible with **virtual thread**, since PAC re-sign is still needed due to the stack copying process (See Requirement-2 in the commit message). Alternatively, we may want to use **relative SP** as the modifier.
However, I didn't know how to get such an **initial SP** value. Do you have any idea?
Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13322#issuecomment-1498798117
More information about the hotspot-dev
mailing list