Messages in this thread | | | Subject | Re: [PATCH] selftests: add seccomp suite | From | Michael Ellerman <> | Date | Wed, 17 Jun 2015 17:31:26 +1000 |
| |
On Tue, 2015-06-16 at 10:54 -0700, Kees Cook wrote: > This imports the existing seccomp test suite into the kernel's selftests > tree. It contains extensive testing of seccomp features and corner cases. > There remain additional tests to move into the kernel tree, but they have > not yet been ported to all the architectures seccomp supports: > https://github.com/redpig/seccomp/tree/master/tests > > Signed-off-by: Kees Cook <keescook@chromium.org> > --- > MAINTAINERS | 1 + > tools/testing/selftests/Makefile | 1 + > tools/testing/selftests/seccomp/.gitignore | 1 + > tools/testing/selftests/seccomp/Makefile | 10 + > tools/testing/selftests/seccomp/seccomp_bpf.c | 2109 ++++++++++++++++++++++++ > tools/testing/selftests/seccomp/test_harness.h | 537 ++++++
Thanks very much for adding this, it would have been very helpful recently when I was trying to get seccomp filter working on powerpc :)
I get one failure in TRACE_syscall.syscall_dropped:
seccomp_bpf.c:1394:TRACE_syscall.syscall_dropped:Expected 1 (1) == syscall(207) (18446744073709551615)
So it looks like we're returning -1 instead of 1.
That's probably a bug in our handling of the return value, or maybe an inconsistency across the arches. I'll try and find time to dig into it.
cheers
| |