On 2026-10-14 10:07, Ludwig Rydberg 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

Reviewed-by: Andreas Larsson <[email protected]>
Tested-by: Andreas Larsson <[email protected]>

Picking this up to my for-next.

Thanks,
Andreas


Reply via email to