diff options
-rw-r--r-- | libc-test/build.rs | 3 | ||||
-rw-r--r-- | src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index ac3f54baf9..a0da6d7edf 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3182,6 +3182,9 @@ fn test_linux(target: &str) { // GRND_INSECURE was added in glibc-2.32 "GRND_INSECURE" => true, + // present in recent kernels only + "PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true, + _ => false, } }); diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index 6ca2701acb..60a1b69323 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -576,10 +576,20 @@ pub const HWCAP_PACG: ::c_ulong = 1 << 31; //pub const HWCAP2_MTE: ::c_ulong = 1 << 18; // linux/prctl.h +pub const PR_PAC_RESET_KEYS: ::c_int = 54; pub const PR_SET_TAGGED_ADDR_CTRL: ::c_int = 55; pub const PR_GET_TAGGED_ADDR_CTRL: ::c_int = 56; +pub const PR_PAC_SET_ENABLED_KEYS: ::c_int = 60; +pub const PR_PAC_GET_ENABLED_KEYS: ::c_int = 61; + pub const PR_TAGGED_ADDR_ENABLE: ::c_ulong = 1; +pub const PR_PAC_APIAKEY: ::c_ulong = 1 << 0; +pub const PR_PAC_APIBKEY: ::c_ulong = 1 << 1; +pub const PR_PAC_APDAKEY: ::c_ulong = 1 << 2; +pub const PR_PAC_APDBKEY: ::c_ulong = 1 << 3; +pub const PR_PAC_APGAKEY: ::c_ulong = 1 << 4; + // Syscall table pub const SYS_io_setup: ::c_long = 0; pub const SYS_io_destroy: ::c_long = 1; |