================
@@ -300,12 +302,12 @@ int DwarfInstructions<A, R>::stepWithDwarf(A 
&addressSpace, pint_t pc,
 
       isSignalFrame = cieInfo.isSignalFrame;
 
-#if defined(_LIBUNWIND_TARGET_AARCH64)
-      // If the target is aarch64 then the return address may have been signed
-      // using the v8.3 pointer authentication extensions. The original
-      // return address needs to be authenticated before the return address is
-      // restored. autia1716 is used instead of autia as autia1716 assembles
-      // to a NOP on pre-v8.3a architectures.
+#if defined(__ARM64E__)
----------------
kovdan01 wrote:

I've not done local testing with the latest version of the PR, but it looks 
like that this changes implements *exactly* the opposite behavior of what we 
are trying to achieve :)

The code under this conditional serves for handling LR signed with pac-ret. And 
we actually need this to be guarded with smth like `#ifndef 
LIBUNWIND_PTRAUTH_CALLS_AND_RETURNS` to avoid executing this code when using 
Apple's arm64e/Linux's pauthtest (because this way, LR is signed as part of 
corresponding ABI and not by pac-ret).

If we put this under `#if defined(__ARM64E__)`, we entirely disable pac-ret 
handling for non-arm64e. This would break things which were working as intended 
before this change.

See my comment 
https://github.com/llvm/llvm-project/pull/143230#discussion_r2369419226 and 
commit with proposed fix ced8b99373c9b0756f1718999996f44a74bdf46d

Please let me know if any help is needed with fixing the issue.

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