[PATCH v2 1/5] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support
Sven Schnelle
svens at linux.ibm.com
Thu Jul 9 07:04:34 UTC 2026
Renzo Davoli <renzo at cs.unibo.it> writes:
> This patch extends PTRACE_SET_SYSCALL_INFO with support for skipping a system
> call triggered via seccomp.
>
> When the tracer retrieves a ptrace_syscall_info structure with
> op == PTRACE_SYSCALL_INFO_SECCOMP, it may choose to skip the system
> call by changing op to PTRACE_SYSCALL_INFO_EXIT and
> populating the exit union fields (rval and is_error) to define
> the return value and error status for the tracee.
Is it possible to indicate the information whether the syscall should be
skipped via a dedicated return value? There's currently work going on[1]
to do this for seccomp, and it would be awkward if ptrace introduces
this at the same time.
At least for s390 this is problematic because it shares gprs[2] for both
syscall number and return value, and if I read the thread correctly this
also doesn't work for MIPS?
[1] https://patchew.org/linux/akVRcPsD._5FR._5FCE1qW@kunlun.suse.cz/
More information about the Strace-devel
mailing list