Minor correction - it's 81 tests that succeed. Most of the improvement
due to changes to patch 3. Correcting patch 1 only added two more.
The remainder may well be due to my use of an old m68k cross tool chain
and old ARAnyM userland. Building the self test against a current system
version is certainly recommended, Adrian!
Cheers,
Michael
Am 12.01.2023 um 16:55 schrieb Michael Schmitz:
Previous version of patch 1 did overwrite a syscall return
value that was changed by ptrace or seccomp (in regs->d0)
by -ENOSYS when skipping a syscall. Branch directly to
ret_from_syscall instead of falling through to badsys (which
must set -ENOSYS). I'm sure this can be done more elegantly.
Patch 3 used the wrong struct definition for ARCH_REGS - the
kernel ptrace code copies 19 registers (from syscall stack
and switch_stack, pt_regs only contains the 14 from the
syscall stack). Stack overflow ensues.
With these changes, 79 of 94 seccomp_bpf tests now succeed.
Cheers,
Michael