mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Drewry <wad@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: keescook@chromium.org, james.l.morris@oracle.com,
	akpm@linux-foundation.com, oleg@redhat.com,
	viro@zeniv.linux.org.uk, nschichan@freebox.fr,
	Will Drewry <wad@chromium.org>,
	rob@landley.net, linux-doc@vger.kernel.org
Subject: [PATCH 3/3] Documentation/prctl/seccomp_filter.txt: document extensions
Date: Mon, 13 Jan 2014 16:42:18 -0600	[thread overview]
Message-ID: <1389652941-19030-1-git-send-email-wad@chromium.org> (raw)
In-Reply-To: <1389645028-17157-2-git-send-email-wad@chromium.org>

(missed this on the first run)

Add an entry for the PR_SECCOMP_EXT entry point and the
only existing consumer, SECCOMP_EXT_ACT_TSYNC.

Signed-off-by: Will Drewry <wad@chromium.org>
---
 Documentation/prctl/seccomp_filter.txt |   28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/Documentation/prctl/seccomp_filter.txt b/Documentation/prctl/seccomp_filter.txt
index 1e469ef..b296701 100644
--- a/Documentation/prctl/seccomp_filter.txt
+++ b/Documentation/prctl/seccomp_filter.txt
@@ -166,10 +166,36 @@ The samples/seccomp/ directory contains both an x86-specific example
 and a more generic example of a higher level macro interface for BPF
 program generation.
 
+Extensions
+----------
+
+SECCOMP_MODE_FILTER supports an additional entry point for accessing
+extended behavior through prctl(PR_SECCOMP_EXT).  Only one extension
+exists today:
+
+SECCOMP_EXT_ACT_TSYNC:
+	If the calling task is running under SECCOMP_MODE_FILTER, it
+	may call prctl() to synchronize the seccomp filter of its
+	threads.  As seccomp behavior is per-task, any thread under
+	SECCOMP_MODE_STRICT will be unaffected, as will any thread
+	under SECCOMP_MODE_FILTER that does not have a filter that is
+	in the filter tree ancestry for the caller.  Any threads that
+	are in SECCOMP_MODE_NONE will be transitioned to
+	SECCOMP_MODE_FILTER if possible.
+
+	Usage:
+		prctl(PR_SECCOMP_EXT, SECCOMP_EXT_ACT_TSYNC, 0, 0);
+
+	If any threads cannot be transitioned, the call will return one
+	of the process ids.  All other threads will have been transitioned.
+	A return value of 0 indicates success. On a negative return value,
+	the errno will be populated appropriately:
+		EINVAL indicates invalid arguments.
+		EACCES indicates invalid seccomp mode.
 
 
 Adding architecture support
------------------------
+---------------------------
 
 See arch/Kconfig for the authoritative requirements.  In general, if an
 architecture supports both ptrace_event and seccomp, it will be able to
-- 
1.7.9.5


  reply	other threads:[~2014-01-13 22:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 20:30 [PATCH 1/2] seccomp: protect seccomp.filter pointer (w) with the task_lock Will Drewry
2014-01-13 20:30 ` [PATCH 2/2] sys, seccomp: add PR_SECCOMP_EXT and SECCOMP_EXT_ACT_TSYNC Will Drewry
2014-01-13 22:42   ` Will Drewry [this message]
2014-01-13 23:36   ` Andy Lutomirski
2014-01-14 18:59     ` Will Drewry
2014-01-14 20:24       ` Andy Lutomirski
2014-01-14 20:59         ` Will Drewry
2014-01-14 21:09           ` Andy Lutomirski
2014-01-14 21:19             ` Will Drewry
2014-01-14 19:07   ` Oleg Nesterov
2014-01-14 19:21   ` Oleg Nesterov
2014-01-14 20:02     ` Oleg Nesterov
2014-01-14 20:13       ` Oleg Nesterov
2014-01-14 20:53         ` Will Drewry
2014-01-14 21:06     ` Will Drewry
2014-01-15 19:04       ` Oleg Nesterov
2014-01-15 19:28         ` Oleg Nesterov
2014-01-15 19:33         ` Will Drewry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389652941-19030-1-git-send-email-wad@chromium.org \
    --to=wad@chromium.org \
    --cc=akpm@linux-foundation.com \
    --cc=james.l.morris@oracle.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nschichan@freebox.fr \
    --cc=oleg@redhat.com \
    --cc=rob@landley.net \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®