linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Atomic addfd send and reply
@ 2021-05-17 19:39 Sargun Dhillon
  2021-05-17 19:39 ` [PATCH v2 1/4] Documentation: seccomp: Fix user notification documentation Sargun Dhillon
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Sargun Dhillon @ 2021-05-17 19:39 UTC (permalink / raw)
  To: Kees Cook, LKML, containers, Tycho Andersen, Andy Lutomirski
  Cc: Sargun Dhillon, Mauricio Vásquez Bernal, Rodrigo Campos,
	Giuseppe Scrivano, Christian Brauner, Mickaël Salaün

This is somewhat of a respin of "Handle seccomp notification preemption"
but without the controversial parts.


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 (socket).

It focuses on one use cases, which is adding file descriptors to a process
"atomically" during the seccomp reply, as opposed to discretizing the calls
which may result in a potential file descriptor leak and inconsistent
program state.

Changes since v1:
 * Clarifcation to commit comments

Rodrigo Campos (2):
  seccomp: Support atomic "addfd + send reply"
  selftests/seccomp: Add test for atomic addfd+send

Sargun Dhillon (2):
  Documentation: seccomp: Fix user notification documentation
  seccomp: Refactor notification handler to prepare for new semantics

 .../userspace-api/seccomp_filter.rst          | 28 +++++--
 include/uapi/linux/seccomp.h                  |  1 +
 kernel/seccomp.c                              | 79 ++++++++++++++-----
 tools/testing/selftests/seccomp/seccomp_bpf.c | 38 +++++++++
 4 files changed, 120 insertions(+), 26 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-06-01 19:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 19:39 [PATCH v2 0/4] Atomic addfd send and reply Sargun Dhillon
2021-05-17 19:39 ` [PATCH v2 1/4] Documentation: seccomp: Fix user notification documentation Sargun Dhillon
2021-05-17 19:39 ` [PATCH v2 2/4] seccomp: Refactor notification handler to prepare for new semantics Sargun Dhillon
2021-05-25 16:03   ` Rodrigo Campos
2021-05-25 20:44     ` Sargun Dhillon
2021-05-27 11:51   ` Rodrigo Campos
2021-05-27 18:41     ` Kees Cook
2021-05-28 15:27       ` Rodrigo Campos
2021-05-28 16:50         ` Kees Cook
2021-05-28 17:14         ` Kees Cook
2021-05-28 22:31           ` Rodrigo Campos
2021-06-01 19:22             ` Kees Cook
2021-05-17 19:39 ` [PATCH v2 3/4] seccomp: Support atomic "addfd + send reply" Sargun Dhillon
2021-05-21 15:45   ` Christian Brauner
2021-05-17 19:39 ` [PATCH v2 4/4] selftests/seccomp: Add test for atomic addfd+send Sargun Dhillon
2021-05-18 16:45 ` [PATCH v2 0/4] Atomic addfd send and reply Andy Lutomirski
2021-05-21 15:44 ` Christian Brauner
2021-05-27  2:43 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).