[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210318051726.2488-1-sargun@sargun.me>
Date: Wed, 17 Mar 2021 22:17:21 -0700
From: Sargun Dhillon <sargun@...gun.me>
To: Kees Cook <keescook@...omium.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux Containers <containers@...ts.linux-foundation.org>
Cc: Sargun Dhillon <sargun@...gun.me>,
Mauricio Vásquez Bernal <mauricio@...volk.io>,
Rodrigo Campos <rodrigo@...volk.io>,
Tycho Andersen <tycho@...ho.pizza>,
Giuseppe Scrivano <gscrivan@...hat.com>,
Christian Brauner <christian.brauner@...ntu.com>
Subject: [PATCH 0/5] Handle seccomp notification preemption
This patchset addresses a race condition we've dealt with recently with
seccomp. Specifically programs interrupting syscalls while they're in
progress. This was exacerbated by Golang's recent adoption of "async
preemption", in which they try to interrupt any syscall that's been
running for more than 10ms during GC. During certain syscalls, it's
non-trivial to write them in a reetrant manner in userspace (mount).
This has a couple semantic changes, and relaxes a check on seccomp_data, and
changes the semantics with ordering of how addfd and notification replies
in the supervisor are handled.
It also follows up on the original proposal from Tycho[2] to allow
for adding an FD and returning that value atomically.
Changes since v1[1]:
* Fix some documentation
* Add Rata's patches to allow for direct return from addfd
[1]: https://lore.kernel.org/lkml/20210220090502.7202-1-sargun@sargun.me/
[2]: https://lore.kernel.org/lkml/202012011322.26DCBC64F2@keescook/
Rodrigo Campos (1):
seccomp: Support atomic "addfd + send reply"
Sargun Dhillon (4):
seccomp: Refactor notification handler to prepare for new semantics
seccomp: Add wait_killable semantic to seccomp user notifier
selftests/seccomp: Add test for wait killable notifier
selftests/seccomp: Add test for atomic addfd+send
.../userspace-api/seccomp_filter.rst | 15 +-
include/uapi/linux/seccomp.h | 4 +
kernel/seccomp.c | 129 ++++++++++++++----
tools/testing/selftests/seccomp/seccomp_bpf.c | 102 ++++++++++++++
4 files changed, 220 insertions(+), 30 deletions(-)
--
2.25.1
Powered by blists - more mailing lists