[PATCH 1/5] ptrace: add PTRACE_SYSCALL_INFO_SECCOMP_SKIP

Renzo Davoli renzo at cs.unibo.it
Thu Jul 2 09:09:03 UTC 2026


Hi Oleg,

> Rather than add the new PTRACE_SYSCALL_INFO_SECCOMP_SKIP, can't we teach
> ptrace_set_syscall_info_seccomp() to treat info->entry.nr == -1 as "skip" ?
it already does
> Note that ptrace_set_syscall_info_seccomp() -> ptrace_set_syscall_info_entry()
> already does syscall_set_nr().
Syscall skipping is useless if there is not a way to set the return value/errno.

As I explain in the cover letter
+ The tracer can skip the system call by setting the system call number
+ to -1. However, the current PTRACE_SET_SYSCALL_INFO interface does not
+ provide a way to specify the return value or error code that should be
+ reported to the tracee after skipping the call.

currently retvalue/errno can be set only at PTRACE_SYSCALL_INFO_EXIT

renzo


More information about the Strace-devel mailing list