[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240523014540.372255-1-avagin@google.com>
Date: Thu, 23 May 2024 01:45:37 +0000
From: Andrei Vagin <avagin@...gle.com>
To: Kees Cook <keescook@...omium.org>, Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>, Oleg Nesterov <oleg@...hat.com>,
Christian Brauner <brauner@...nel.org>
Cc: linux-kernel@...r.kernel.org, Tycho Andersen <tandersen@...flix.com>,
Andrei Vagin <avagin@...gle.com>, Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 0/3 v2] seccomp: improve handling of SECCOMP_IOCTL_NOTIF_RECV
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.
v2: - Remove unnecessary checks of PF_EXITING.
- Take siglock with disabling irqs.
Thanks to Oleg for the review and the help with the first version.
Andrei Vagin (3):
seccomp: interrupt SECCOMP_IOCTL_NOTIF_RECV when all users have exited
seccomp: release task filters when the task exits
selftests/seccomp: add test for NOTIF_RECV and unused filters
kernel/exit.c | 3 +-
kernel/seccomp.c | 38 ++++++++++---
tools/testing/selftests/seccomp/seccomp_bpf.c | 54 +++++++++++++++++++
3 files changed, 88 insertions(+), 7 deletions(-)
Cc: Kees Cook <keescook@...omium.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Will Drewry <wad@...omium.org>
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Christian Brauner <brauner@...nel.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Tycho Andersen <tandersen@...flix.com>
--
2.45.0.rc1.225.g2a3ae87e7f-goog
Powered by blists - more mailing lists