summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-19 03:06:41 +0000
committerbors <bors@rust-lang.org>2023-02-19 03:06:41 +0000
commit586883b42ccbd17b362b7091e4f2c7a5def8e313 (patch)
tree0f7544354a26c5de82a4020124662a05a72d72df
parent9e3471a1f6a55e3e6f5ada5b140ef4078919adbe (diff)
parentb2cd40758501fc9defb26ffabb56c34085fdbb31 (diff)
downloadrust-libc-586883b42ccbd17b362b7091e4f2c7a5def8e313.tar.gz
Auto merge of #3116 - devnexen:prctl_upd_arm64, r=JohnTitor
prctl SME flags for gnu arm64.
-rw-r--r--libc-test/build.rs4
-rw-r--r--src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs7
2 files changed, 10 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index b11cf1363f..d05672a47e 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -3588,8 +3588,10 @@ fn test_linux(target: &str) {
// present in recent kernels only
"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,
- // present in recent kernels only
+ // present in recent kernels only >= 5.13
"PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true,
+ // present in recent kernels only >= 5.19
+ "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,
// Added in Linux 5.14
"FUTEX_LOCK_PI2" => true,
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 a20a1cf688..f46ea941b9 100644
--- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
+++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
@@ -590,6 +590,13 @@ 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;
+pub const PR_SME_SET_VL: ::c_int = 63;
+pub const PR_SME_GET_VL: ::c_int = 64;
+pub const PR_SME_VL_LEN_MAX: ::c_int = 0xffff;
+
+pub const PR_SME_SET_VL_INHERIT: ::c_ulong = 1 << 17;
+pub const PR_SME_SET_VL_ONE_EXEC: ::c_ulong = 1 << 18;
+
// Syscall table
pub const SYS_io_setup: ::c_long = 0;
pub const SYS_io_destroy: ::c_long = 1;