[PATCH 1/2] ptrace: PTRACE_SET_SYSCALL_INFO syscall skipping support

Renzo Davoli renzo at cs.unibo.it
Sat Jul 4 14:25:20 UTC 2026


You are right, fixing in v2.
renzo

On Sat, Jul 04, 2026 at 01:17:48PM +0200, Oleg Nesterov wrote:
> 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