RFR: 8277204: Implementation of JEP 8264130: PAC-RET protection for Linux/AArch64 [v14]

Andrew Dinn adinn at openjdk.java.net
Tue Jan 25 11:11:44 UTC 2022


On Mon, 24 Jan 2022 16:51:26 GMT, Alan Hayward <duke at openjdk.java.net> wrote:

>> src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp line 835:
>> 
>>> 833:   __ stp(rlocals, rcpool, Address(sp, 2 * wordSize));
>>> 834: 
>>> 835:   __ protect_return_address();
>> 
>> Most of the changes to fix the tests look fairly self-explanatory but I don't really understand why you relocated call to protect_return-_address from its previous location at line 801. Can you explain why it has been moved?
>
> I originally moved it as part of debugging (a GC load_at occurs during the load_mirror).
> Once all the GC changes went in (all the enter_subframe calls), this change was no longer required.
> Then, when I came to change it back, I realised it made more sense in the new place. The protect is now directly before the storing of lr to the stack. That's logically a better place and should make the assembler easier to read.

Ok, I thought the new place looked better but was not clear why it had not been there in the first place. Thanks for clarifying.

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

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



More information about the build-dev mailing list