================

----------------
kovdan01 wrote:

As I mentioned in our prior discussion, just putting old signed RA handling 
logic under `!defined(LIBUNWIND_PTRAUTH_CALLS_AND_RETURNS)` is fine - see my 
[explanation](https://github.com/llvm/llvm-project/commit/e2f8b9d3859eff96442ce04662aefb40debbef3f#r165673683)
 (I kindly ask you to continue discussion here since it's easy to lose comments 
in individual commits).

Also, I've ensured that pac-ret remains working properly after applying this 
patch and my proposed fix ced8b99373c9b0756f1718999996f44a74bdf46d.

Particularly:

1. Mainline llvm, **mainline** runtime libraries built **with** pac-ret, user 
code built with pac-ret - unwinding works fine (`RA_SIGN_STATE` detected in all 
stack frames)

2. Mainline llvm, **mainline** runtime libraries built **without** pac-ret, 
user code built with pac-ret - unwinding works fine (`RA_SIGN_STATE` detected 
in user stack frames and not detected in stack frames of runtime libraries)

3. Mainline llvm, **mainline + this PR + my fix** runtime libraries built 
**with** pac-ret, user code built with pac-ret - unwinding works fine 
(`RA_SIGN_STATE` detected in all stack frames)

4. Mainline llvm, **mainline + this PR + my fix** runtime libraries built 
**without** pac-ret, user code built with pac-ret - unwinding works fine 
(`RA_SIGN_STATE` detected in user stack frames and not detected in stack frames 
of runtime libraries)

So, the proposed change ced8b99373c9b0756f1718999996f44a74bdf46d does not break 
anything. Those using pac-ret instead of full arm64e/pauthtest would not even 
notice something changed.

P.S. In future, we want to unify libunwind logic for handling signed RA. I've 
created a task for this: #160110.

https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to