Skip to content

Commit 395106f

Browse files
committed
linux: update ptrace_syscall_info struct
Add new flags field and reserveds. Rename wrongly named field `sval` to `rval`.
1 parent d29bc7f commit 395106f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4683,7 +4683,9 @@ fn test_linux(target: &str) {
46834683
true
46844684
}
46854685
// the `u` field is in fact an anonymous union
4686-
("ptrace_syscall_info", "u" | "pad") if gnu => true,
4686+
("ptrace_syscall_info", "u") if gnu => true,
4687+
// FIXME(linux): `flags` requires >= 6.16 kernel headers
4688+
("ptrace_syscall_info", "flags") if gnu => true,
46874689
// the vregs field is a `__uint128_t` C's type.
46884690
("user_fpsimd_struct", "vregs") => true,
46894691
// Linux >= 5.11 tweaked the `svm_zero` field of the `sockaddr_vm` struct.

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,19 +171,21 @@ s! {
171171
}
172172

173173
pub struct __c_anonymous_ptrace_syscall_info_exit {
174-
pub sval: crate::__s64,
174+
pub rval: crate::__s64,
175175
pub is_error: crate::__u8,
176176
}
177177

178178
pub struct __c_anonymous_ptrace_syscall_info_seccomp {
179179
pub nr: crate::__u64,
180180
pub args: [crate::__u64; 6],
181181
pub ret_data: crate::__u32,
182+
reserved2: Padding<crate::__u32>,
182183
}
183184

184185
pub struct ptrace_syscall_info {
185186
pub op: crate::__u8,
186-
pub pad: [crate::__u8; 3],
187+
reserved: Padding<crate::__u8>,
188+
pub flags: crate::__u16,
187189
pub arch: crate::__u32,
188190
pub instruction_pointer: crate::__u64,
189191
pub stack_pointer: crate::__u64,

0 commit comments

Comments
 (0)