[llvm] [LFI][AArch64] Add PAC support (PR #207915)

Zachary Yedidia via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 23:49:50 PDT 2026


================
@@ -317,6 +322,89 @@ temporary, before loading it back into ``x30`` with a safe ``add``.
 |                           |                               |
 +---------------------------+-------------------------------+
 
+Pointer Authentication Code (PAC) support
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+LFI is compatible with Arm Pointer Authentication Code (PAC) instructions,
+which are used to sign and authenticate ``x30`` to protect against control-flow
+hijacking.
+
+To gain the security benefit of PAC under LFI, the hardware must implement
----------------
zyedidia wrote:

Thanks for the suggestion -- since we do have a scratch register we could support this approach. We've also discussed an implementation that would perform a load from the target address to cause a trap if it becomes poisoned, although that is incompatible with execute-only memory. I'll make a note of this for the future, but plan to stick with the current functionality for this patch.

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


More information about the llvm-commits mailing list