[PATCH 1/2] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support
Oleg Nesterov
oleg at redhat.com
Sat Jul 4 11:17:48 UTC 2026
On 07/04, Renzo Davoli wrote:
>
> - /* Changing the type of the system call stop is not supported yet. */
> - if (ptrace_get_syscall_info_op(child) != info.op)
> - return -EINVAL;
> + /*
> + * Changing the type of the system call stop is not allowed, with the
> + * following exception:
> + * PTRACE_SYSCALL_INFO_SECCOMP or PTRACE_SYSCALL_INFO_ENTRY can be changed
> + * to PTRACE_SYSCALL_INFO_EXIT to skip the system call
> + */
> +
> + if (ptrace_get_syscall_info_op(child) != info.op) {
> + if (info.op != PTRACE_SYSCALL_INFO_EXIT)
> + return -EINVAL;
> + skip_syscall = true;
> + }
Ah... I forgot that ptrace_get_syscall_info_op() can return _NONE.
We should not allow _NONE -> _EXIT transition.
Oleg.
More information about the Strace-devel
mailing list