From: Sargun Dhillon <sargun@sargun.me>
To: Kees Cook <keescook@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Containers <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 1/4] Documentation: seccomp: Fix user notification documentation
Date: Sat, 1 May 2021 17:18:48 -0700 [thread overview]
Message-ID: <20210502001851.3346-2-sargun@sargun.me> (raw)
In-Reply-To: <20210502001851.3346-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>
---
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-02 0:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 0:18 [PATCH 0/4] Atomic addfd send and reply Sargun Dhillon
2021-05-02 0:18 ` Sargun Dhillon [this message]
2021-05-02 0:18 ` [PATCH 2/4] seccomp: Refactor notification handler to prepare for new semantics Sargun Dhillon
2021-05-02 0:18 ` [PATCH 3/4] seccomp: Support atomic "addfd + send reply" Sargun Dhillon
2021-05-11 21:50 ` Tycho Andersen
2021-05-17 17:53 ` Sargun Dhillon
2021-05-17 18:10 ` Tycho Andersen
2021-05-02 0:18 ` [PATCH 4/4] selftests/seccomp: Add test for atomic addfd+send Sargun Dhillon
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=20210502001851.3346-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.