linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v11 0/11] seccomp: add thread sync ability
@ 2014-07-16 21:50 Kees Cook
  2014-07-16 21:50 ` [PATCH v11 01/11] seccomp: create internal mode-setting function Kees Cook
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Kees Cook @ 2014-07-16 21:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kees Cook, Andy Lutomirski, Oleg Nesterov, James Morris,
	Michael Kerrisk (man-pages),
	Alexei Starovoitov, Andrew Morton, Daniel Borkmann, Will Drewry,
	Julien Tinnes, David Drysdale, linux-api, x86, linux-arm-kernel,
	linux-mips, linux-arch, linux-security-module

This adds the ability for threads to request seccomp filter
synchronization across their thread group (at filter attach time).
For example, for Chrome to make sure graphic driver threads are fully
confined after seccomp filters have been attached.

To support this, locking on seccomp changes via thread-group-shared
sighand lock is introduced, along with refactoring of no_new_privs. Races
with thread creation are handled via delayed duplication of the seccomp
task struct field and cred_guard_mutex.

This includes a new syscall (instead of adding a new prctl option),
as suggested by Andy Lutomirski and Michael Kerrisk.

Thanks!

-Kees

v11:
 - updated writer locking commit log for clarity (luto)
 - clarified writer lock thread flag setting comment (luto)
 - inverted SECCOMP_FILTER_FLAG_MASK (luto)
 - renamed is_acestor parameter (luto)
 - added BUG_ON to catch currently impossible integer overflow (luto)
v10:
 - dropped pending-kill checks (oleg)
 - tweaked memory barriers (oleg)
v9:
 - rearranged/split patches to make things more reviewable
 - added use of cred_guard_mutex to solve exec race (oleg, luto)
 - added barriers for TIF_SECCOMP vs seccomp.mode race (oleg, luto)
 - fixed missed copying of nnp state after v8 refactor (oleg)
v8:
 - drop use of tasklist_lock, appears redundant against sighand (oleg)
 - reduced use of smp_load_acquire to logical minimum (oleg)
 - change nnp to a task struct held atomic flags field (oleg, luto)
 - drop needless irqflags changes in fork.c for holding sighand lock (oleg)
 - cleaned up use of thread for-each loop (oleg)
 - rearranged patch order to keep syscall changes adjacent
 - added example code to manpage (mtk)
v7:
 - rebase on Linus's tree (merged with network bpf changes)
 - wrote manpage text documenting API (follows this series)
v6:
 - switch from seccomp-specific lock to thread-group lock to gain atomicity
 - implement seccomp syscall across all architectures with seccomp filter
 - clean up sparse warnings around locking
v5:
 - move includes around (drysdale)
 - drop set_nnp return value (luto)
 - use smp_load_acquire/store_release (luto)
 - merge nnp changes to seccomp always, fewer ifdef (luto)
v4:
 - cleaned up locking further, as noticed by David Drysdale
v3:
 - added SECCOMP_EXT_ACT_FILTER for new filter install options
v2:
 - reworked to avoid clone races


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

end of thread, other threads:[~2014-07-17 17:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 21:50 [PATCH v11 0/11] seccomp: add thread sync ability Kees Cook
2014-07-16 21:50 ` [PATCH v11 01/11] seccomp: create internal mode-setting function Kees Cook
2014-07-16 21:50 ` [PATCH v11 02/11] seccomp: extract check/assign mode helpers Kees Cook
2014-07-16 21:50 ` [PATCH v11 03/11] seccomp: split mode setting routines Kees Cook
2014-07-16 21:50 ` [PATCH v11 04/11] seccomp: add "seccomp" syscall Kees Cook
2014-07-16 21:50 ` [PATCH v11 05/11] ARM: add seccomp syscall Kees Cook
2014-07-16 21:50 ` [PATCH v11 06/11] MIPS: " Kees Cook
2014-07-16 21:50 ` [PATCH v11 07/11] sched: move no_new_privs into new atomic flags Kees Cook
2014-07-16 21:50 ` [PATCH v11 08/11] seccomp: split filter prep from check and apply Kees Cook
2014-07-16 21:50 ` [PATCH v11 09/11] seccomp: introduce writer locking Kees Cook
2014-07-16 21:50 ` [PATCH v11 10/11] seccomp: allow mode setting across threads Kees Cook
2014-07-16 21:50 ` [PATCH v11 11/11] seccomp: implement SECCOMP_FILTER_FLAG_TSYNC Kees Cook
2014-07-17 15:04   ` David Drysdale
2014-07-17 15:45     ` Kees Cook
2014-07-17 17:52       ` 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).