mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] sparc32: add seccomp filter support
@ 2026-10-14  8:07 Ludwig Rydberg
  2026-10-14  8:07 ` [PATCH 1/3] sparc32: Split common syscall_trace() to syscall_trace_{enter|leave}() Ludwig Rydberg
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ludwig Rydberg @ 2026-10-14  8:07 UTC (permalink / raw)
  To: Andreas Larsson, David S. Miller, Kees Cook, sparclinux
  Cc: Andy Lutomirski, Will Drewry, Oleg Nesterov, Shuah Khan,
	linux-kselftest, linux-kernel, John Paul Adrian Glaubitz,
	Stian Halseth, Ludwig Rydberg

This adds SECCOMP_FILTER support for sparc32 on top of Stian Halseth's
sparc64 series (v2):
https://lore.kernel.org/r/20260902072745.3412940-1-stian@itx.no

Patch 1 splits syscall_trace() into syscall_trace_enter() and
syscall_trace_leave() as on sparc64 and most other architectures.

Patch 2 adds a call to seccomp_permit_syscall() in syscall_trace_enter()
to filter system calls. A denied syscall skips the call and goes
through the syscall exit work with the return value already set.

Patch 3 extends the seccomp_bpf selftest's SPARC support to sparc32.

Testing:
seccomp_bpf on v7.3-rc1 with the whole seccomp series applied on a
GR-CPCI-GR740 board from Frontgrade Gaisler:

- UP: pass:99 fail:0 skip:12
- SMP with out-of-tree patches that implement the futex atomic
  operations with CASA on LEON: pass:99 fail:0 skip:12
- SMP without them: pass:89 fail:10 skip:12.
  FUTEX depends on !(SPARC32 && SMP) (see 3f2bedabb62c) and glibc aborts
  with "The futex facility returned an unexpected error code" in the 10
  tests that use threads (KILL_thread,
  user_notification_filter_empty_threaded, tsync_vs_dead_thread_leader and
  the 7 TSYNC tests).

The 12 skipped tests need the UPROBES which sparc32 does not have.

Ludwig Rydberg (3):
  sparc32: Split common syscall_trace() to syscall_trace_{enter|leave}()
  sparc32: add seccomp filter support
  selftests/seccomp: add sparc32 support

 arch/sparc/Kconfig                            |  2 +-
 arch/sparc/include/asm/thread_info_32.h       |  2 +
 arch/sparc/kernel/entry.S                     | 33 ++++++++--------
 arch/sparc/kernel/kernel.h                    |  3 +-
 arch/sparc/kernel/ptrace_32.c                 | 26 ++++++++-----
 tools/testing/selftests/seccomp/seccomp_bpf.c | 38 +++++++++++++------
 6 files changed, 66 insertions(+), 38 deletions(-)


base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
prerequisite-patch-id: 5772aba3cb572833df13529ec6bb03ae9e848e25
prerequisite-patch-id: 70a54ba398c763e45f9332ff4cc06b3f2a3e7825
--
2.35.3


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

end of thread, other threads:[~2026-10-14 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14  8:07 [PATCH 0/3] sparc32: add seccomp filter support Ludwig Rydberg
2026-10-14  8:07 ` [PATCH 1/3] sparc32: Split common syscall_trace() to syscall_trace_{enter|leave}() Ludwig Rydberg
2026-10-14  8:07 ` [PATCH 2/3] sparc32: add seccomp filter support Ludwig Rydberg
2026-10-14  8:07 ` [PATCH 3/3] selftests/seccomp: add sparc32 support Ludwig Rydberg
2026-10-14  9:29   ` Stian Halseth
2026-10-14 16:40   ` Kees Cook
2026-10-14 16:36 ` [PATCH 0/3] sparc32: add seccomp filter support Magnus Lindholm

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®