Skip to content

Commit

Permalink
Auto merge of #2838 - devnexen:linux_followup_prctl, r=JohnTitor
Browse files Browse the repository at this point in the history
linux prctl add speculation control flags
  • Loading branch information
bors committed Jul 20, 2022
2 parents 29217b9 + 6bc25bc commit 4238054
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,19 @@ pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1;
pub const PTRACE_SYSEMU: ::c_uint = 31;
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32;

pub const PR_GET_SPECULATION_CTRL: ::c_int = 52;
pub const PR_SET_SPECULATION_CTRL: ::c_int = 53;
pub const PR_SPEC_NOT_AFFECTED: ::c_uint = 0;
pub const PR_SPEC_PRCTL: ::c_uint = 1 << 0;
pub const PR_SPEC_ENABLE: ::c_uint = 1 << 1;
pub const PR_SPEC_DISABLE: ::c_uint = 1 << 2;
pub const PR_SPEC_FORCE_DISABLE: ::c_uint = 1 << 3;
pub const PR_SPEC_DISABLE_NOEXEC: ::c_uint = 1 << 4;
pub const PR_SPEC_STORE_BYPASS: ::c_int = 0;
pub const PR_SPEC_INDIRECT_BRANCH: ::c_int = 1;
// FIXME: perharps for later
//pub const PR_SPEC_L1D_FLUSH: ::c_int = 2;

pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;

Expand Down

0 comments on commit 4238054

Please sign in to comment.