[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 10:53:02 PDT 2024


https://github.com/smithp35 commented:

I'm wondering if it is worth resurrecting https://discourse.llvm.org/t/aarch64-pauthabi-options-for-command-line-options-to-use-the-pauthabi-and-set-signing-schema/73479 to see if we can get some more visibility on this. It has also been almost a year since that was posted.

Some colleagues expressed some concern that as this was introducing a new ABI, while the existing -mbranch-protection options are ABI neutral [*], then perhaps a better option would be to use the `-mabi` option. For example `-mabi=pauthabi`.

There are some advantages and disadvantages to doing that. It is explicit that there is a different ABI being used, however it is logically an extension of the CFI features in `-mbranch-protection` and some of the branch-protection modifiers such as `+ret` could be useful.

Will be worth having some thoughts on how you would want to interact with existing mbranch-protection options. If pauthabi would supersede all the pointer authentication parts then it may be better to have a `-mabi` option?







[*] Stack unwinding needs to be aware of signed return addresses, but these can be optional.

https://github.com/llvm/llvm-project/pull/97237


More information about the cfe-commits mailing list