Skip to content

seccomp: Allow using SECCOMP_MODE_STRICT with SECCOMP_MODE_FILTER

Jamie Hill-Daniel bpf lkml 3 versions – New

Get series with b4
b4 am [email protected] change-id 20260302-seccomp-combined-24bc3dbe32fd

Versions newest first

  1. v2 Latest3 patches 0 repliesNew
  2. v1 posting 2/22 patches 11 repliesSuperseded
  3. v1 posting 1/22 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3seccomp: Store death as a separate fieldinclude/linux/seccomp_types.h kernel/seccomp.c+12 -110 replies
2/3seccomp: Allow upgrading to strict mode after enabling filtersinclude/linux/seccomp_types.h kernel/seccomp.c+27 -310 replies
3/3selftest: seccomp: Adjust tests for using both STRICT and FILTERtools/testing/selftests/seccomp/seccomp_bpf.c+29 -390 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWilliam Liu
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] seccomp: Allow using SECCOMP_MODE_STRICT with SECCOMP_MODE_FILTER

This patch adjusts the logic used by seccomp to allow applying both SECCOMP_MODE_FILTER and SECCOMP_MODE_STRICT to the same process.

Currently, once seccomp has been initialized, a process may not transition to a different mode (only add additional filters). This means that in container environments such as Docker, which by default runs with SECCOMP_MODE_FILTER, processes may not enable SECCOMP_MODE_STRICT. This is an obstacle to using applications requiring SECCOMP_MODE_STRICT in these environments, and requires disabling these security measures.

This series adds a new 'strict upgrade' flag, which runs strict checks after the filters.

---
Jamie Hill-Daniel (3):
seccomp: Store death as a separate field
seccomp: Allow upgrading to strict mode after enabling filters
selftest: seccomp: Adjust tests for using both STRICT and FILTER

 include/linux/seccomp_types.h                 |  7 ++-
 kernel/seccomp.c                              | 74 ++++++++++++---------------
 tools/testing/selftests/seccomp/seccomp_bpf.c | 68 +++++++++++-------------
 3 files changed, 68 insertions(+), 81 deletions(-)

---
base-commit: b9f0372b25cf3c41bf8eda02e65733afa5e8ad7c
change-id: 20260302-seccomp-combined-24bc3dbe32fd

Best regards,

Signature · 1 line
Jamie Hill-Daniel <[email protected]>