mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] seccomp: document and test Seccomp_filters in /proc/PID/status
@ 2026-12-02  8:13 Gabriel Changamire
  2026-12-02  8:13 ` [PATCH 1/2] docs: proc: document " Gabriel Changamire
  2026-12-02  8:13 ` [PATCH 2/2] selftests/seccomp: test filter reporting " Gabriel Changamire
  0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Changamire @ 2026-12-02  8:13 UTC (permalink / raw)
  To: Kees Cook
  Cc: Andy Lutomirski, Will Drewry, Shuah Khan, Jonathan Corbet,
	Randy Dunlap, linux-kselftest, linux-doc, linux-fsdevel,
	linux-kernel, Gabriel Changamire

Since v5.9, /proc/PID/status has reported the number of seccomp filters
attached to a task in a Seccomp_filters line. The field is missing from
Documentation/filesystems/proc.rst, and the seccomp selftests never
read /proc/PID/status, so neither the mode nor the filter count shown
there is tested.

Patch 1 documents the field. Patch 2 adds selftests covering the filter
count as filters are attached, its inheritance across fork(), and its
propagation to sibling threads with SECCOMP_FILTER_FLAG_TSYNC.

Kees, if it is convenient for you to take both through the seccomp
tree, that keeps them together; otherwise patch 1 can go through the
documentation tree on its own.

Testing: the new tests pass on a 6.12 kernel both from a process with no
seccomp filter and from inside a container whose runtime already applies
one, which is why the counts are checked against a baseline. I also
changed each expected value to a wrong one to confirm that every test
fails as it should. proc.rst parses with no new docutils warnings.

Gabriel Changamire (2):
  docs: proc: document Seccomp_filters in /proc/PID/status
  selftests/seccomp: test filter reporting in /proc/PID/status

 Documentation/filesystems/proc.rst            |   2 +
 tools/testing/selftests/seccomp/seccomp_bpf.c | 178 ++++++++++++++++++
 2 files changed, 180 insertions(+)

-- 
2.47.3


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

end of thread, other threads:[~2026-12-02  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02  8:13 [PATCH 0/2] seccomp: document and test Seccomp_filters in /proc/PID/status Gabriel Changamire
2026-12-02  8:13 ` [PATCH 1/2] docs: proc: document " Gabriel Changamire
2026-12-02  8:13 ` [PATCH 2/2] selftests/seccomp: test filter reporting " Gabriel Changamire

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®