Skip to content

Commit ac13950

Browse files
committed
linux add ptrace_rseq_configuration
1 parent 35cd8f0 commit ac13950

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,6 +3027,8 @@ fn test_linux(target: &str) {
30273027
// FIXME: requires >= 5.4.1 kernel headers
30283028
"j1939_filter" if musl => true,
30293029

3030+
"ptrace_rseq_configuration" => true,
3031+
30303032
_ => false,
30313033
}
30323034
});
@@ -3268,6 +3270,9 @@ fn test_linux(target: &str) {
32683270
| "RTNLGRP_STATS" // linux v5.18+
32693271
=> true,
32703272

3273+
// Added in Linux 5.13
3274+
"PTRACE_GET_RSEQ_CONFIGURATION" => true,
3275+
32713276
_ => false,
32723277
}
32733278
});

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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
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)