linux-stable/tools/testing/selftests/seccomp
Kees Cook 0fb0acc0dd selftests/seccomp: Enhance per-arch ptrace syscall skip tests
commit ed5f13261c upstream.

Passing EPERM during syscall skipping was confusing since the test wasn't
actually exercising the errno evaluation -- it was just passing a literal
"1" (EPERM). Instead, expand the tests to check both direct value returns
(positive, 45000 in this case), and errno values (negative, -ESRCH in this
case) to check both fake success and fake failure during syscall skipping.

Reported-by: Colin Ian King <colin.king@canonical.com>
Fixes: a33b2d0359 ("selftests/seccomp: Add tests for basic ptrace actions")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06 17:30:11 +01:00
..
.gitignore selftests: seccomp: update .gitignore with newly added tests 2017-11-15 08:01:42 -07:00
config selftests: create test-specific kconfig fragments 2016-02-25 09:47:52 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
seccomp_benchmark.c selftests/seccomp: Add simple seccomp overhead benchmark 2017-08-14 13:46:41 -07:00
seccomp_bpf.c selftests/seccomp: Enhance per-arch ptrace syscall skip tests 2019-02-06 17:30:11 +01:00