Skip to content

Commit d99c37d

Browse files
committed
Auto merge of #2923 - devnexen:ptrace_another_update, r=JohnTitor
linux add ptrace_rseq_configuration
2 parents 5ffe00e + 2bd3e49 commit d99c37d

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3068,6 +3068,7 @@ fn test_linux(target: &str) {
30683068

30693069
// FIXME: Unignore once we update Ubuntu to 22.04
30703070
"mallinfo2" if sparc64 => true,
3071+
"ptrace_rseq_configuration" if sparc64 => true,
30713072

30723073
_ => false,
30733074
}
@@ -3309,6 +3310,8 @@ fn test_linux(target: &str) {
33093310
| "IFLA_PERM_ADDRESS"
33103311
| "IFLA_PROTO_DOWN_REASON"
33113312
if sparc64 => true,
3313+
// Added in Linux 5.13
3314+
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true,
33123315

33133316
_ => false,
33143317
}

libc-test/semver/linux-gnu-x86_64.txt

+2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ NFT_MSG_NEWOBJ
1919
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
2020
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
2121
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
22+
PTRACE_GET_RSEQ_CONFIGURATION
2223
PTRACE_SYSEMU
2324
PTRACE_SYSEMU_SINGLESTEP
2425
_libc_fpstate
2526
flock64
2627
getcontext
2728
makecontext
29+
ptrace_rseq_configuration
2830
setcontext
2931
swapcontext
3032
termios2

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ s! {
265265
pub seccomp_notif_resp: ::__u16,
266266
pub seccomp_data: ::__u16,
267267
}
268+
269+
pub struct ptrace_rseq_configuration {
270+
pub rseq_abi_pointer: ::__u64,
271+
pub rseq_abi_size: ::__u32,
272+
pub signature: ::__u32,
273+
pub flags: ::__u32,
274+
pub pad: ::__u32,
275+
}
268276
}
269277

270278
s_no_extra_traits! {
@@ -535,6 +543,7 @@ pub const O_ASYNC: ::c_int = 0x2000;
535543
pub const O_NDELAY: ::c_int = 0x800;
536544

537545
pub const PTRACE_DETACH: ::c_uint = 17;
546+
pub const PTRACE_GET_RSEQ_CONFIGURATION: ::c_uint = 0x420f;
538547

539548
pub const EFD_NONBLOCK: ::c_int = 0x800;
540549

0 commit comments

Comments
 (0)