Skip to content

Commit

Permalink
Auto merge of #3116 - devnexen:prctl_upd_arm64, r=JohnTitor
Browse files Browse the repository at this point in the history
prctl SME flags for gnu arm64.
  • Loading branch information
bors committed Feb 19, 2023
2 parents 9e3471a + b2cd407 commit 586883b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 586883b

Please sign in to comment.