Skip to content

Commit 7b89676

Browse files
committed
prctl SME flags for gnu arm64.
1 parent 35ad929 commit 7b89676

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libc-test/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3583,6 +3583,8 @@ fn test_linux(target: &str) {
35833583

35843584
// present in recent kernels only
35853585
"PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true,
3586+
// present in recent kernels only
3587+
"PR_SME_SET_VL" | "PR_SME_GET_VL" | "PR_SME_VL_LEN_MAX" | "PR_SME_SET_VL_INHERIT" | "PR_SEM_SET_VL_ONE_EXEC" => true,
35863588

35873589
// Added in Linux 5.14
35883590
"FUTEX_LOCK_PI2" => true,

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,13 @@ pub const PR_PAC_APDAKEY: ::c_ulong = 1 << 2;
590590
pub const PR_PAC_APDBKEY: ::c_ulong = 1 << 3;
591591
pub const PR_PAC_APGAKEY: ::c_ulong = 1 << 4;
592592

593+
pub const PR_SME_SET_VL: ::c_int = 63;
594+
pub const PR_SME_GET_VL: ::c_int = 64;
595+
pub const PR_SME_VL_LEN_MAX: ::c_int = 0xffff;
596+
597+
pub const PR_SME_SET_VL_INHERIT: ::c_ulong = 1 << 17;
598+
pub const PR_SME_SET_VL_ONE_EXEC: ::c_ulong = 1 << 18;
599+
593600
// Syscall table
594601
pub const SYS_io_setup: ::c_long = 0;
595602
pub const SYS_io_destroy: ::c_long = 1;

0 commit comments

Comments
 (0)