[llvm] [llvm-exegesis][AArch64] Check for PAC keys before disabling them (PR #138643)
Abhilash Majumder via llvm-commits
llvm-commits at lists.llvm.org
Wed May 7 07:56:32 PDT 2025
================
@@ -207,15 +207,28 @@ class ExegesisAArch64Target : public ExegesisTarget {
if (isPointerAuth(Opcode)) {
#if defined(__aarch64__) && defined(__linux__)
+
+ // For some systems with existing PAC keys set, it is better to
+ // check the existing state of the key before setting it.
+ // For systems without PAC, this is a No-op but with PAC, it is
+ // safer to check the existing key state and then disable/enable them.
+ // Hence the guard placed for switching.
+ unsigned long PacKeys = 0;
+ if (prctl(PR_PAC_GET_ENABLED_KEYS, &pac_keys, 0, 0, 0) < 0) {
----------------
abhilash1910 wrote:
Yes saw that in the failure . Thanks :)
https://github.com/llvm/llvm-project/pull/138643
More information about the llvm-commits
mailing list