mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 05:49:47 -04:00
The arm64 ABI selftests fail to compile due to missing include paths for kernel headers, causing errors like incomplete type struct sock_filter and implicit BPF macro declarations. Add $(KHDR_INCLUDES) and -I$(top_srcdir)/tools/include to CFLAGS to resolve the header search path. Also remove the hardcoded __NR_write macro and include <asm/unistd.h> to obtain the correct syscall number. Fixes:21e37da120("kselftest/arm64: Add testcase for SECCOMP_RET_TRACE orig_x0 bypass") Fixes:2fcbc4adf9("kselftest/arm64: Add seccomp ptrace x0 bypass test") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202608021842.jp6IBrFi-lkp@intel.com/ Suggested-by: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Brown <broonie@kernel.org> Tested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Will Deacon <will@kernel.org>
KSelfTest ARM64
===============
- These tests are arm64 specific and so not built or run but just skipped
completely when env-variable ARCH is found to be different than 'arm64'
and `uname -m` reports other than 'aarch64'.
- Holding true the above, ARM64 KSFT tests can be run within the KSelfTest
framework using standard Linux top-level-makefile targets:
$ make TARGETS=arm64 kselftest-clean
$ make TARGETS=arm64 kselftest
or
$ make -C tools/testing/selftests TARGETS=arm64 \
INSTALL_PATH=<your-installation-path> install
or, alternatively, only specific arm64/ subtargets can be picked:
$ make -C tools/testing/selftests TARGETS=arm64 ARM64_SUBTARGETS="tags signal" \
INSTALL_PATH=<your-installation-path> install
Further details on building and running KFST can be found in:
Documentation/dev-tools/kselftest.rst