RFR: 8277204: Implement PAC-RET branch protection on Linux/AArch64 [v18]

Alan Hayward duke at openjdk.java.net
Mon Feb 7 12:04:16 UTC 2022


On Mon, 7 Feb 2022 11:54:09 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Allocating FP is disabled for rop protection:
>> 
>> aarch64.md has:
>> // r29 is not allocatable when PreserveFramePointer or ROP protection is on
>> if (PreserveFramePointer || VM_Version::use_rop_protection()) {
>> 
>> I think that covers it.
>> What assertion would you want to check?
>
> If `UseROPProtection` is on, is there any reason not to set `PreserveFramePointer`, and assert here that it is set? It is a crucial assumption, so let's assert it.

PreserveFramePointer is doing some additional stuff. I'll give it a test to make sure everything still works with PreserveFramePointer fully set. It would make things easier just to force it set with rop protection on.

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

PR: https://git.openjdk.java.net/jdk/pull/6334



More information about the build-dev mailing list