[llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 03:00:04 PDT 2023


================
@@ -0,0 +1,548 @@
+Pointer Authentication
+======================
+
+.. contents::
+   :local:
+
+Introduction
+------------
+
+Pointer authentication is a technology which offers strong probabilistic protection against exploiting a broad class of memory bugs to take control of program execution.  When adopted consistently in a language ABI, it provides a form of relatively fine-grained control flow integrity (CFI) check that resists both return-oriented programming (ROP) and jump-oriented programming (JOP) attacks.
+
+While pointer authentication can be implemented purely in software, direct hardware support (e.g. as provided by ARMv8.3) can dramatically lower the execution speed and code size costs.  Similarly, while pointer authentication can be implemented on any architecture, taking advantage of the (typically) excess addressing range of a target with 64-bit pointers minimizes the impact on memory performance and can allow interoperation with existing code (by disabling pointer authentication dynamically).  This document will generally attempt to present the pointer authentication feature independent of any hardware implementation or ABI.  Considerations that are implementation-specific are clearly identified throughout.
+
+Note that there are several different terms in use:
+
+- **Pointer authentication** is a target-independent language technology.
+
+- **ARMv8.3** is an AArch64 architecture revision of that provides hardware support for pointer authentication.  It is implemented on several shipping processors, including the Apple A12 and later.
----------------
DavidSpickett wrote:

PAuth is mandatory in v8.3: `FEAT_PAuth is mandatory in Armv8.3 implementations.`, however it might be better to note that it's a feature included in v8.3 `FEAT_PAuth and FEAT_EPAC, Pointer authentication and Enhanced Pointer authentication`. PAuth is the name we tend to use in compilers too.

Then the sentence about arm64e below could then be more clear in that arm64e is using this specific feature of armv8.3. armv8.3 isn't just about pauth, though functionally it means you have pauth. (see `Architectural features added by Armv8.3`, https://developer.arm.com/documentation/ddi0487/latest/)

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


More information about the llvm-commits mailing list