mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Renzo Davoli <renzo@cs.unibo.it>, Kees Cook <kees@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	"Davide Berardi" <berardi.dav@gmail.com>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Will Drewry" <wad@chromium.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Shuah Khan" <shuah@kernel.org>,
	"Dmitry V . Levin" <ldv@strace.io>,
	"Alexey Gladkov" <legion@kernel.org>,
	"Eugene Syromyatnikov" <evgsyr@gmail.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Madhavan Srinivasan" <maddy@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
	linux-kselftest@vger.kernel.org, strace-devel@lists.strace.io
Subject: Re: [PATCH v11 1/3] seccomp: let the tracer skip a syscall independently of its number
Date: Tue, 17 Nov 2026 17:54:34 +0100	[thread overview]
Message-ID: <avyGylgRmpAHan9r@redhat.com> (raw)
In-Reply-To: <20261114181923.370930-2-renzo@cs.unibo.it>

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 <msuchanek@suse.de>
> Assisted-by: claude-opus-5-5
> Signed-off-by: Renzo Davoli <renzo@cs.unibo.it>

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

But it LGTM. So FWIW

Reviewed-by: Oleg Nesterov <oleg@redhat.com>



(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	other threads:[~2026-11-17 16:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 18:19 [PATCH v11 0/3] PTRACE_SET_SYSCALL_INFO: add support for seccomp syscall skipping Renzo Davoli
2026-11-14 18:19 ` [PATCH v11 1/3] seccomp: let the tracer skip a syscall independently of its number Renzo Davoli
2026-11-17 16:54   ` Oleg Nesterov [this message]
2026-11-14 18:19 ` [PATCH v11 2/3] ptrace: add PTRACE_SET_SYSCALL_INFO syscall skipping support Renzo Davoli
2026-11-17 16:23   ` Oleg Nesterov
2026-11-14 18:19 ` [PATCH v11 3/3] selftests/ptrace: add a test case for PTRACE_SET_SYSCALL_INFO syscall skipping Renzo Davoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avyGylgRmpAHan9r@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=berardi.dav@gmail.com \
    --cc=evgsyr@gmail.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kees@kernel.org \
    --cc=ldv@strace.io \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luto@amacapital.net \
    --cc=maddy@linux.ibm.com \
    --cc=msuchanek@suse.de \
    --cc=renzo@cs.unibo.it \
    --cc=shuah@kernel.org \
    --cc=strace-devel@lists.strace.io \
    --cc=tglx@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®