On 11/14, Renzo Davoli wrote:
>
> Add a per-task flag which the tracer sets with
> seccomp_ptrace_skip_syscall() while the tracee is stopped at the
> PTRACE_EVENT_SECCOMP stop, after it has set the return value.  When the
> tracee resumes, seccomp skips the system call like for
> SECCOMP_RET_ERRNO, which every architecture already handles without
> touching the return value.
>
> The flag is cleared by the tracee before the stop and written by the
> tracer only while the tracee is stopped, so it needs no locking: the
> wake-up of the tracee orders it like the registers written by the
> tracer.
>
> The next patch uses this in PTRACE_SET_SYSCALL_INFO.
>
> Suggested-by: Michal Suchánek <[email protected]>
> Assisted-by: claude-opus-5-5
> Signed-off-by: Renzo Davoli <[email protected]>

I am not comfortable to review this change ;) Kees, can you take a look?

But it LGTM. So FWIW

Reviewed-by: Oleg Nesterov <[email protected]>



(As for the new new member in struct seccomp... we can probably avoid it
 if you don't like it, but .ptrace_skip looks like the simplest solution
 for the start)


Reply via email to