selftests/seccomp: Report event mismatches more clearly
authorKees Cook <keescook@chromium.org>
Wed, 3 Nov 2021 16:30:39 +0000 (09:30 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 3 Nov 2021 19:02:07 +0000 (12:02 -0700)
commit1e6d69c7b9cd7735bbf4c6754ccbb9cce8bd8ff4
treeb94be3e5c604e59dd37560bf162f6cb1a882fce4
parent48d5fd06453de57f9d9385c7ebcdf3b50658a962
selftests/seccomp: Report event mismatches more clearly

When running under tracer, more explicitly report the status and event
mismatches to help with debugging. Additionally add an "immediate kill"
test when under tracing to verify that fatal SIGSYS behaves the same
under ptrace or seccomp tracing.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Link: https://lore.kernel.org/r/20211103163039.2104830-3-keescook@chromium.org
tools/testing/selftests/seccomp/seccomp_bpf.c