[PATCH 1/5] ptrace: add PTRACE_SYSCALL_INFO_SECCOMP_SKIP

Dmitry V. Levin ldv at strace.io
Thu Jul 2 11:07:55 UTC 2026


On Thu, Jul 02, 2026 at 11:58:14AM +0200, Oleg Nesterov wrote:
[...]
> @@ -1047,6 +1069,11 @@ ptrace_set_syscall_info_entry(struct task_struct *child, struct pt_regs *regs,
>  	if (nr != info->entry.nr)
>  		return -ERANGE;
>  
> +	syscall_set_nr(child, regs, nr);
> +	if (nr == -1)
> +		return __set_syscall_info_exit(child, regs,
> +						info->entry.rval, info->entry.is_error);

The kernel shouldn't suddenly start interpreting info->entry.rval and
info->entry.is_error because the current users of this interface are not
aware that the kernel might be doing it.  If we want to extend
PTRACE_SYSCALL_INFO_ENTRY/PTRACE_SYSCALL_INFO_SECCOMP this way, we would
have to require setting a flag in info->flags signalling the kernel that
the user requests this new behaviour.


-- 
ldv


More information about the Strace-devel mailing list