Hi Ludwig, On Wed, Oct 14, 2026 at 10:07 AM Ludwig Rydberg <[email protected]> wrote: > > This adds SECCOMP_FILTER support for sparc32 on top of Stian Halseth's > sparc64 series (v2): > https://lore.kernel.org/r/[email protected] > > 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 > >
Tested the series on a dual-CPU HyperSPARC SPARCstation 20 with my patched v7.3-rc1 kernel, including SMP futex support. The cross-built seccomp_bpf selftests completed on real hardware: 92 passed, 0 failed, 19 skipped. The harness timeout was increased to 180 seconds; test workloads were unchanged. No new kernel messages or taint appeared. Tested-by: Magnus Lindholm <[email protected]>

