selftests/seccomp: build and pass on arm64
authorKees Cook <keescook@chromium.org>
Tue, 6 Oct 2015 19:30:25 +0000 (12:30 -0700)
committerShuah Khan <shuahkh@osg.samsung.com>
Fri, 16 Oct 2015 02:06:27 +0000 (20:06 -0600)
commit256d0afb11d6e878e8c793e4a6e3bbfb81f9aae8
tree654f0501341f10f055017ba2c5a9e8c162966b94
parent1f78dda2cf5e4eeb00aee2a01c9515e2e704b4c0
selftests/seccomp: build and pass on arm64

Changing arm64 syscalls is done via a specific register set, more like s390
than like arm (specific ptrace call) and x86 (part of general registers).
Since (restarting) poll doesn't exist on arm64, switch to using nanosleep
for testing restart_syscall. And since it looks like the syscall ABI is
inconsistent on arm-compat, so we must work around it (and document it) in
the test.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/seccomp/seccomp_bpf.c