Skip to content
Open
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a88910d
fix pac/pag
abhilash1910 May 6, 2025
009d3ba
review comments
abhilash1910 May 6, 2025
2c80855
review comments
abhilash1910 May 7, 2025
2a9af0f
typo build error
abhilash1910 May 7, 2025
7dde4a4
add einval condition and reviews
abhilash1910 May 9, 2025
e7b3600
Merge branch 'main' into exegesis_fix
abhilash1910 May 12, 2025
079d268
Update llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
abhilash1910 May 12, 2025
635c646
Update llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
abhilash1910 May 12, 2025
7ca6ee7
review updates
abhilash1910 May 12, 2025
e1b6523
format fix
abhilash1910 May 12, 2025
fd254b0
format fix
abhilash1910 May 12, 2025
42075c6
use nullptr as silentcondition
abhilash1910 May 13, 2025
2b5c69a
use nullptr as silentcondition
abhilash1910 May 13, 2025
1be4386
update patch
abhilash1910 May 15, 2025
6613b7a
refine
abhilash1910 May 23, 2025
977612d
fix duplicate includes
abhilash1910 May 27, 2025
fb876f1
clang-format
abhilash1910 May 27, 2025
139eeeb
refresh
abhilash1910 Jun 3, 2025
4a0f565
Merge branch 'main' into exegesis_fix
abhilash1910 Jun 3, 2025
5c2b583
refresh
abhilash1910 Jun 3, 2025
481b28c
Merge branch 'exegesis_fix' of https://github.com/abhilash1910/llvm-p…
abhilash1910 Jun 3, 2025
652e0f8
newline
abhilash1910 Jun 3, 2025
ab57635
format
abhilash1910 Jun 3, 2025
5b80111
refresh
abhilash1910 Jun 6, 2025
57ca61f
refresh opcodes
abhilash1910 Jun 11, 2025
f4821ce
refresh
abhilash1910 Jul 7, 2025
94a8e4d
Merge branch 'main' into exegesis_fix
abhilash1910 Jul 19, 2025
1864d3a
Merge branch 'main' into exegesis_fix
abhilash1910 Aug 6, 2025
a55c27a
Merge branch 'main' into exegesis_fix
abhilash1910 Aug 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
return "Failed to get PAC key status";
}

// Disable all PAC keys. Note that while we expect the measurements to
// be the same with PAC keys disabled, they could potentially be lower
// since authentication checks are bypassed.
if (prctl(PR_PAC_SET_ENABLED_KEYS,
PR_PAC_APIAKEY | PR_PAC_APIBKEY | PR_PAC_APDAKEY |
PR_PAC_APDBKEY, // all keys
0, // disable all
0, 0) < 0) {
return "Failed to disable PAC keys";
if (PacKeys != 0) {
if (prctl(PR_PAC_SET_ENABLED_KEYS,
PR_PAC_APIAKEY | PR_PAC_APIBKEY | PR_PAC_APDAKEY |
PR_PAC_APDBKEY, // all keys
0, // disable all
0, 0) < 0) {
return "Failed to disable PAC keys";
}
}
#else
return "Unsupported opcode: isPointerAuth";
Expand Down
Loading