Description
ARM64v8.3 supports Pointer Authentication with the PACIASP and AUTIASP instructions which are interpreted as NOP instructions on pre-8.3 architectures. These instructions sign the stack pointer and validate the stack pointer prior to return to mitigate return oriented programming.
GCC supports these options on arm64 / aarch64. The legacy option was -msign-return-address=[all | non-leaf | none]
and the modern option is -mbranch-protection=none|standard|pac-ret[+leaf+b-key]|bti
I would like to suggest that the arm64 build be modified to include -mbranch-protection=pac-ret
with the -march
being set to ARMv8.2 or earlier or not configured, so that GCC will generate PACIASP and AUTIASP instructions. It is critical that -march=armv8.3
or higher not be passed or the non-backwards compatible RETAA instruction will be generated.
The benefit of enabling pointer authentication for the stack pointer on ARM64 would be to mitigate return oriented programming attacks against the CPython runtime.
Presently we (GoDaddy) are pursuing custom compiles of the CPython runtime for the new Graviton3 CPUs that support pointer authentication in AWS.