public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Kees Cook <kees@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@kernel.org>, Will Drewry <wad@chromium.org>,
	Eric Paris <eparis@redhat.com>,
	Kusaram Devineni <kusaram@devineni.in>,
	Max Ver <dudududumaxver@gmail.com>,
	Paul Moore <paul@paul-moore.com>,
	audit@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] seccomp: drop syscall exit events for rejected syscalls
Date: Tue, 21 Apr 2026 20:59:13 +0200	[thread overview]
Message-ID: <aefJAYnzZT-zhif5@redhat.com> (raw)
In-Reply-To: <202604210951.7FFD917D@keescook>

On 04/21, Kees Cook wrote:
>
> On Sun, Apr 19, 2026 at 05:53:25PM +0200, Oleg Nesterov wrote:
> > seccomp_nack_syscall() calls syscall_rollback(), which means that the
> > syscall exit path sees the original syscall number as the return value.
> >
> > This confuses audit_syscall_exit(), trace_syscall_exit(), and ptrace,
> > causing them to report completely bogus syscall exit events.
> >
> > Add a new SYSCALL_WORK_SECCOMP_EXIT flag set by seccomp_nack_syscall(),
> > and change syscall_exit_work() to return early if this flag is set. After
> > all, this syscall was never actually executed.
>
> I think this looks good.

Great,

> I'd like to cover the non-generic syscall
> paths, though, too?

OK, I'll try to make the "extended" V2 soon.

> (Otherwise we immediately have a behavioral
> difference between e.g. x86 and arm64.)

Yes, yes, agreed, I even mentioned this in 0/2.

Thanks!

Oleg.


      reply	other threads:[~2026-04-21 18:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 15:52 [RFC PATCH 0/2] seccomp: drop syscall exit events for rejected syscalls Oleg Nesterov
2026-04-19 15:53 ` [RFC PATCH 1/2] seccomp: introduce seccomp_nack_syscall() helper Oleg Nesterov
2026-04-19 15:53 ` [RFC PATCH 2/2] seccomp: drop syscall exit events for rejected syscalls Oleg Nesterov
2026-04-21 16:52   ` Kees Cook
2026-04-21 18:59     ` Oleg Nesterov [this message]

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=aefJAYnzZT-zhif5@redhat.com \
    --to=oleg@redhat.com \
    --cc=audit@vger.kernel.org \
    --cc=dudududumaxver@gmail.com \
    --cc=eparis@redhat.com \
    --cc=kees@kernel.org \
    --cc=kusaram@devineni.in \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=paul@paul-moore.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --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