git: 643fe6ba676d - stable/15 - ptrace.2: Document PT_SET_SC_RET

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=643fe6ba676de7708e7e21b3badf393f6eca2961

commit 643fe6ba676de7708e7e21b3badf393f6eca2961
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-07-15 13:42:44 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-07-27 00:28:42 +0000

    ptrace.2: Document PT_SET_SC_RET
    
    (cherry picked from commit f967dd04c880e9c9c68cd20de135d77b3ca1c26d)
---
 lib/libsys/ptrace.2 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lib/libsys/ptrace.2 b/lib/libsys/ptrace.2
index a6798bb22b27..e1739a56e115 100644
--- a/lib/libsys/ptrace.2
+++ b/lib/libsys/ptrace.2
@@ -851,6 +851,26 @@ and
 .Xr sigreturn 2
 .Pc .
 .El
+.It Dv PT_SET_SC_RET
+Set the current system call return values.
+This request is only valid for threads stopped in a syscall
+entry (the
+.Dv PL_FLAG_SCE
+state).
+The
+.Fa addr
+argument specifies a pointer to a
+.Vt "struct ptrace_sc_ret" ,
+the
+.Fa data
+argument is set to the size of the structure.
+.Pp
+The current system call handler is not executed.
+After the thread is resumed, it returns to userspace with machine state
+set as though the system call handler had returned the values passed via
+the content of the
+.Vt "struct ptrace_sc_ret"
+argument.
 .It Dv PT_FOLLOW_FORK
 This request controls tracing for new child processes of a traced process.
 If
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.