[llvm] [AArch64][PAC] Refine authenticated pointer check methods (PR #74074)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 05:09:32 PST 2023


atrosinenko wrote:

Ping.

A few notes on the patch:
* instead of defining a private constant `BrkOperandBase = 0xc470` to add to an LLVM's key id here and there (as it was done in #72502), an opaque `BrkOperandForKey(key)` helper function is introduced as it is kind of coincidence that the "reference" BRK operands are computed based on the same `AArch64PACKey` enum :)
* it is worth to further change `AuthCheckMethod::DummyLoad` to perform a 1-byte load instead of a 4-byte load if checking a "data pointer" (loading the last byte of the last mapped page in a range is not relevant for code but possible for data). This is **not** changed by this patch as `@llvm.ptrauth.auth` should be the first suitable user of `checkAuthenticatedRegister` function for data pointers, so no tests can be added here. This patch does not include adding the generic `AuthCheckMethod::XPAC` method for a similar reason

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


More information about the llvm-commits mailing list