Skip to content

Commit 8578b60

Browse files
[clang] Add ABI-defined key assignments to ptrauth.h. (#93901)
This is the current key assignment defined by the arm64e architecture on Darwin platforms, and also matches the intended key assignments in the initial ELF adopters. This can be made more generic if needed, by e.g., defining these in the preprocessor instead.
1 parent cab81dd commit 8578b60

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

clang/lib/Headers/ptrauth.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ typedef enum {
1515
ptrauth_key_asib = 1,
1616
ptrauth_key_asda = 2,
1717
ptrauth_key_asdb = 3,
18+
19+
/* A process-independent key which can be used to sign code pointers. */
20+
ptrauth_key_process_independent_code = ptrauth_key_asia,
21+
22+
/* A process-specific key which can be used to sign code pointers. */
23+
ptrauth_key_process_dependent_code = ptrauth_key_asib,
24+
25+
/* A process-independent key which can be used to sign data pointers. */
26+
ptrauth_key_process_independent_data = ptrauth_key_asda,
27+
28+
/* A process-specific key which can be used to sign data pointers. */
29+
ptrauth_key_process_dependent_data = ptrauth_key_asdb,
30+
1831
} ptrauth_key;
1932

2033
/* An integer type of the appropriate size for a discriminator argument. */

0 commit comments

Comments
 (0)