Thread (10 messages) 10 messages, 3 authors, 2026-02-10

Re: [PATCH] man/man2/ptrace.2: Add PTRACE_SET_SYSCALL_INFO, update struct ptrace_syscall_info

From: Marco Cavenati <hidden>
Date: 2026-02-07 18:38:06

Well in that case, I wish you a great and recharging rest!
And sorry for the ping :)

Marco

On Saturday, February 07, 2026 19:24 CET, Alejandro Colomar [off-list ref] wrote:
Hi Marco,

On 2026-02-07T12:59:39+0100, Marco Cavenati wrote:
quoted
Hi Alex,

Gentle ping, just checking whether this patch got lost.
Happy to revise if needed.
Thanks!  No, it didn't.  I was just too busy last week with a meeting of
the C Committee, plus the preparation before it, and also preparing a
release of the man-pages for this or next week.  I need some sleep for
a few days, and next week I'll be back at reviewing stuff.  :-)


Have a lovely night!
Alex
quoted
Thanks
Marco

On Wednesday, January 21, 2026 16:55 CET, Marco Cavenati [off-list ref] wrote:
quoted
Add documentation for the new ptrace request PTRACE_SET_SYSCALL_INFO,
introduced in Linux 6.16.

Add 'reserved' and 'flags' fields of struct ptrace_syscall_info.

This description is based on kernel commit 26bb32768fe6552de044f782a58b3272073fbfc0
("ptrace: introduce PTRACE_SET_SYSCALL_INFO request") by Dmitry V. Levin.

Signed-off-by: Marco Cavenati <redacted>
---
 AUTHORS           |  1 +
 man/man2/ptrace.2 | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
diff --git a/AUTHORS b/AUTHORS
index 9035d405a..f332932e1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -497,6 +497,7 @@ Marc-André Lureau <marcandre.lureau@redhat.com>
 Marcela Maslanova <mmaslano@redhat.com>
 Marcin Ślusarz <marcin.slusarz@gmail.com>
 Marco Bonelli <marco@mebeim.net>
+Marco Cavenati <marco.cavenati@eurecom.fr>
 Marcus Folkesson <marcus.folkesson@gmail.com>
 Marcus Gelderie <redmnic@gmail.com>
 Marcus Huewe <suse-tux@gmx.de>
diff --git a/man/man2/ptrace.2 b/man/man2/ptrace.2
index 2da43dcb9..45d4c4c84 100644
--- a/man/man2/ptrace.2
+++ b/man/man2/ptrace.2
@@ -1042,6 +1042,8 @@ structure contains the following fields:
 .EX
 struct ptrace_syscall_info {
     __u8 op;        /* Type of system call stop */
+    __u8 reserved;  /* Reserved for future use, must be zero */
+    __u16 flags;    /* Reserved for future use, must be zero */
     __u32 arch;     /* AUDIT_ARCH_* value; see seccomp(2) */
     __u64 instruction_pointer; /* CPU instruction pointer */
     __u64 stack_pointer;    /* CPU stack pointer */
@@ -1121,6 +1123,25 @@ is limited to type
 unless
 .B PTRACE_O_TRACESYSGOOD
 option is set before the corresponding system call stop has occurred.
+.TP
+.BR PTRACE_SET_SYSCALL_INFO " (since Linux 6.16)"
+.\" commit 26bb32768fe6552de044f782a58b3272073fbfc0
+Modify information about the system call that caused the stop.
+The
+.I data
+argument is a pointer to
+.I struct ptrace_syscall_info
+that specifies the system call information to be set.
+The
+.I addr
+argument should be set to
+.IR "sizeof(struct ptrace_syscall_info)" .
+Only the
+.IR nr ,
+.IR args ,
+and
+.I rval
+fields can be modified.
 .\"
 .SS Death under ptrace
 When a (possibly multithreaded) process receives a killing signal
-- 
2.51.0
-- 
<https://www.alejandro-colomar.es>
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help