From: Sargun Dhillon <sargun@sargun.me>
To: Kees Cook <keescook@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
containers@lists.linux.dev, Tycho Andersen <tycho@tycho.pizza>,
Andy Lutomirski <luto@kernel.org>
Cc: "Sargun Dhillon" <sargun@sargun.me>,
"Mauricio Vásquez Bernal" <mauricio@kinvolk.io>,
"Rodrigo Campos" <rodrigo@kinvolk.io>,
"Giuseppe Scrivano" <gscrivan@redhat.com>,
"Christian Brauner" <christian.brauner@ubuntu.com>,
"Mickaël Salaün" <mic@linux.microsoft.com>
Subject: [PATCH v2 1/4] Documentation: seccomp: Fix user notification documentation
Date: Mon, 17 May 2021 12:39:05 -0700 [thread overview]
Message-ID: <20210517193908.3113-2-sargun@sargun.me> (raw)
In-Reply-To: <20210517193908.3113-1-sargun@sargun.me>
The documentation had some previously incorrect information about how
userspace notifications (and responses) were handled due to a change
from a previously proposed patchset.
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Acked-by: Tycho Andersen <tycho@tycho.pizza>
---
Documentation/userspace-api/seccomp_filter.rst | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/userspace-api/seccomp_filter.rst b/Documentation/userspace-api/seccomp_filter.rst
index bd9165241b6c..6efb41cc8072 100644
--- a/Documentation/userspace-api/seccomp_filter.rst
+++ b/Documentation/userspace-api/seccomp_filter.rst
@@ -250,14 +250,14 @@ Users can read via ``ioctl(SECCOMP_IOCTL_NOTIF_RECV)`` (or ``poll()``) on a
seccomp notification fd to receive a ``struct seccomp_notif``, which contains
five members: the input length of the structure, a unique-per-filter ``id``,
the ``pid`` of the task which triggered this request (which may be 0 if the
-task is in a pid ns not visible from the listener's pid namespace), a ``flags``
-member which for now only has ``SECCOMP_NOTIF_FLAG_SIGNALED``, representing
-whether or not the notification is a result of a non-fatal signal, and the
-``data`` passed to seccomp. Userspace can then make a decision based on this
-information about what to do, and ``ioctl(SECCOMP_IOCTL_NOTIF_SEND)`` a
-response, indicating what should be returned to userspace. The ``id`` member of
-``struct seccomp_notif_resp`` should be the same ``id`` as in ``struct
-seccomp_notif``.
+task is in a pid ns not visible from the listener's pid namespace). The
+notification also contains the ``data`` passed to seccomp, and a filters flag.
+The structure should be zeroed out prior to calling the ioctl.
+
+Userspace can then make a decision based on this information about what to do,
+and ``ioctl(SECCOMP_IOCTL_NOTIF_SEND)`` a response, indicating what should be
+returned to userspace. The ``id`` member of ``struct seccomp_notif_resp`` should
+be the same ``id`` as in ``struct seccomp_notif``.
It is worth noting that ``struct seccomp_data`` contains the values of register
arguments to the syscall, but does not contain pointers to memory. The task's
--
2.25.1
next prev parent reply other threads:[~2021-05-17 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 19:39 [PATCH v2 0/4] Atomic addfd send and reply Sargun Dhillon
2021-05-17 19:39 ` Sargun Dhillon [this message]
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
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=20210517193908.3113-2-sargun@sargun.me \
--to=sargun@sargun.me \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux.dev \
--cc=gscrivan@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mauricio@kinvolk.io \
--cc=mic@linux.microsoft.com \
--cc=rodrigo@kinvolk.io \
--cc=tycho@tycho.pizza \
/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®