There is a pointer authentication project goal.. Are there any opsem questions we have to answer around pointer authentication, or is the idea that all UB-free Rust programs (including arbitrary UB-free unsafe code) will behave exactly as before?
I haven't yet found a description of pointer authentication that's written for people that don't care about the aarch64 details, everything is exceedingly low-level. The goal owner pointed me to https://llvm.org/docs/PointerAuth.html which is the most comprehensible description I found so far, though what is still missing is any idea when those operations are invoked by a Rust program. So based on that there are some first questions:
- It seems like
llvm.ptrauth.sign alters the address bits of the pointer. What does that mean for things like dereferenceability? Are both the old and new pointer dereferenceable but point to the same memory? That seems pretty incompatible with our memory model. Does the old pointer become invalid when the intrinsic is called?
- Something happens with function pointer calls. Those are apparently also signed. Do we have to worry about introducing new ABI compatibility issues here, similar to what happened with CFI?
Cc @jchlanda
There is a pointer authentication project goal.. Are there any opsem questions we have to answer around pointer authentication, or is the idea that all UB-free Rust programs (including arbitrary UB-free unsafe code) will behave exactly as before?
I haven't yet found a description of pointer authentication that's written for people that don't care about the aarch64 details, everything is exceedingly low-level. The goal owner pointed me to https://llvm.org/docs/PointerAuth.html which is the most comprehensible description I found so far, though what is still missing is any idea when those operations are invoked by a Rust program. So based on that there are some first questions:
llvm.ptrauth.signalters the address bits of the pointer. What does that mean for things like dereferenceability? Are both the old and new pointer dereferenceable but point to the same memory? That seems pretty incompatible with our memory model. Does the old pointer become invalid when the intrinsic is called?Cc @jchlanda