[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEWA0a5tUkdbKH1UBE6Yw1uW5tdAMLehmOm9Q15ypPivo0-heg@mail.gmail.com>
Date: Mon, 24 Jun 2024 17:19:06 -0700
From: Andrei Vagin <avagin@...gle.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Kees Cook <keescook@...omium.org>, Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>, Christian Brauner <brauner@...nel.org>, linux-kernel@...r.kernel.org,
Tycho Andersen <tandersen@...flix.com>, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH 0/3 v2] seccomp: improve handling of SECCOMP_IOCTL_NOTIF_RECV
On Thu, May 23, 2024 at 2:35 AM Oleg Nesterov <oleg@...hat.com> wrote:
>
> On 05/23, Andrei Vagin wrote:
> >
> > This patch set addresses two problems with the SECCOMP_IOCTL_NOTIF_RECV
> > ioctl:
> > * it doesn't return when the seccomp filter becomes unused (all tasks
> > have exited).
> > * EPOLLHUP is triggered not when a task exits, but rather when its zombie
> > is collected.
>
> It seems that 2/3 also fixes another minor problem.
>
> Suppose that a group leader installs the new filter without
> SECCOMP_FILTER_FLAG_TSYNC, exits, and becomes a zombie. It can't be
> released until all its sub-threads exit.
>
> After that, without 2/3, SECCOMP_FILTER_FLAG_TSYNC from any other thread
> can never succeed, seccomp_can_sync_threads() will check a zombie leader
> and is_ancestor() will fail.
>
> Right?
It is right. I can introduce a self test for this case too, but let's
do that in a separate patch set.
>
> Oleg.
>
Powered by blists - more mailing lists