[PATCH v1 0/1] aarch64: make RA signing method extendable for upcoming PAuth_LR
Matthieu Longo
matthieu.longo@arm.com
Fri Nov 8 15:25:04 GMT 2024
The Pointer Authentication (PAuth) architecture provides instructions that enable software to sign an address using SP as a diversifier. This form of PAC instruction is typically used for signing return addresses that are stored on the stack.
The new Armv9.5-A architecture introduces an enhancement of the previous PAuth feature, called PAuth_LR. It aims at hardening the PAC in a signed return address. When signing the return address in LR, the PC is used as a diversifier, in addition to the SP to generate PAC code.
PAuth introduced the DWARF register RA_SIGN_STATE which stores the return address signed state (currently no signing, or signed with SP). PAuth_LR adds a new value to this state: signed with SP and PC. This DWARF register can now be set via 2 directives:
- DW_CFA_AARCH64_negate_ra_state: toggle the RA state in a PAuth context.
- DW_CFA_AARCH64_negate_ra_state_with_pc: toggle the RA state in a PAuth_LR context.
The existing implementation relies on a binary approach that cannot accomodate with the new state value.
This patch is a refactoring to make the RA signing method extendable for the upcoming PAuth_LR patch series.
Regression tested on aarch64-unknown-linux-gnu, and no regression found.
Ok for binutils-master?
Regards,
Matthieu.
Matthieu Longo (1):
aarch64: make RA signing method extendable for upcoming PAuth_LR
gas/gen-sframe.c | 22 ++++++++++++++--------
gas/gen-sframe.h | 17 ++++++++++++++---
include/sframe.h | 4 ++--
3 files changed, 30 insertions(+), 13 deletions(-)
--
2.47.0
More information about the Binutils
mailing list