Skip to content

Commit 586883b

Browse files
committed
Auto merge of #3116 - devnexen:prctl_upd_arm64, r=JohnTitor
prctl SME flags for gnu arm64.
2 parents 9e3471a + b2cd407 commit 586883b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3588,8 +3588,10 @@ fn test_linux(target: &str) {
35883588
// present in recent kernels only
35893589
"PR_SCHED_CORE" | "PR_SCHED_CORE_CREATE" | "PR_SCHED_CORE_GET" | "PR_SCHED_CORE_MAX" | "PR_SCHED_CORE_SCOPE_PROCESS_GROUP" | "PR_SCHED_CORE_SCOPE_THREAD" | "PR_SCHED_CORE_SCOPE_THREAD_GROUP" | "PR_SCHED_CORE_SHARE_FROM" | "PR_SCHED_CORE_SHARE_TO" => true,
35903590

3591-
// present in recent kernels only
3591+
// present in recent kernels only >= 5.13
35923592
"PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true,
3593+
// present in recent kernels only >= 5.19
3594+
"PR_SME_SET_VL" | "PR_SME_GET_VL" | "PR_SME_VL_LEN_MAX" | "PR_SME_SET_VL_INHERIT" | "PR_SME_SET_VL_ONE_EXEC" => true,
35933595

35943596
// Added in Linux 5.14
35953597
"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)