[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240523093334.GD15163@redhat.com>
Date: Thu, 23 May 2024 11:33:35 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrei Vagin <avagin@...gle.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 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?
Oleg.
Powered by blists - more mailing lists