LLVM Pointer Authentication sync-ups

Meeting minutes for June 27th 2022 meeting

We discussed one topic: how could the signing schema be refined further so that function pointers can be passed between different programming languages directly, such as C, C++, Rust, Swift, …? Some key aspects discussed were:

  • It seems there is scope to make the signing schema more restrictive, for example, by including the size and signedness of integer arguments in the computation for the PAC code of a function pointer.
  • There are a lot of potential second-order effects and issues around marking specific data types or function types as following the C ABI and rules in other programming languages. At least Rust (Other reprs - The Rustonomicon) and Swift seem to support this. Especially disagreement between C and other programming languages on whether 2 type declarations are considered to represent the same type or different types can have knock-on effects.
  • One potential avenue to make sure that a function pointer to a function that is marked to follow the C ABI for a platform has the same PAC code across programming languages is to make the signing schema only depend on how the C ABI lays out/passes arguments and return values. It’s unclear if this would be implementable easily.