selftests/seccomp: Get page size from sysconf
authorBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Fri, 13 Nov 2015 03:17:51 +0000 (11:17 +0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 18 Nov 2015 23:56:53 +0000 (16:56 -0700)
commit2ce47b44b25d8fb0114ff117813742adbefec8ff
tree3d887ac8d930f10cd14524d736846222edcdc30b
parent9e5b8a6e53c79e6ccdbe6e62142ed9f317cefd46
selftests/seccomp: Get page size from sysconf

The commit fd88d16c58c2 ("selftests/seccomp: Be more precise with
syscall arguments.") use PAGE_SIZE directly which lead to build
failure on arm64.

Replace it with generic interface(sysconf(_SC_PAGESIZE)) to fix this
failure.

Build and test successful on x86_64 and arm64.

Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/seccomp/seccomp_bpf.c