Skip to content

Commit

Permalink
linux add ptrace_rseq_configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Sep 24, 2022
1 parent 35cd8f0 commit ac13950
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/build.rs
Expand Up @@ -3027,6 +3027,8 @@ fn test_linux(target: &str) {
// FIXME: requires >= 5.4.1 kernel headers
"j1939_filter" if musl => true,

"ptrace_rseq_configuration" => true,

_ => false,
}
});
Expand Down Expand Up @@ -3268,6 +3270,9 @@ fn test_linux(target: &str) {
| "RTNLGRP_STATS" // linux v5.18+
=> true,

// Added in Linux 5.13
"PTRACE_GET_RSEQ_CONFIGURATION" => true,

_ => false,
}
});
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux-gnu-x86_64.txt
Expand Up @@ -19,12 +19,14 @@ NFT_MSG_NEWOBJ
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
PTRACE_GET_RSEQ_CONFIGURATION
PTRACE_SYSEMU
PTRACE_SYSEMU_SINGLESTEP
_libc_fpstate
flock64
getcontext
makecontext
ptrace_rseq_configuration
setcontext
swapcontext
termios2
9 changes: 9 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
Expand Up @@ -265,6 +265,14 @@ s! {
pub seccomp_notif_resp: ::__u16,
pub seccomp_data: ::__u16,
}

pub struct ptrace_rseq_configuration {
pub rseq_abi_pointer: ::__u64,
pub rseq_abi_size: ::__u32,
pub signature: ::__u32,
pub flags: ::__u32,
pub pad: ::__u32,
}
}

s_no_extra_traits! {
Expand Down Expand Up @@ -535,6 +543,7 @@ pub const O_ASYNC: ::c_int = 0x2000;
pub const O_NDELAY: ::c_int = 0x800;

pub const PTRACE_DETACH: ::c_uint = 17;
pub const PTRACE_GET_RSEQ_CONFIGURATION: ::c_uint = 0x420f;

pub const EFD_NONBLOCK: ::c_int = 0x800;

Expand Down

0 comments on commit ac13950

Please sign in to comment.