linux/tools/testing/selftests/seccomp
Neill Kapron 39044a10d9 selftests/seccomp: fix syscall_restart test for arm compat
[ Upstream commit 797002deed ]

The inconsistencies in the systcall ABI between arm and arm-compat can
can cause a failure in the syscall_restart test due to the logic
attempting to work around the differences. The 'machine' field for an
ARM64 device running in compat mode can report 'armv8l' or 'armv8b'
which matches with the string 'arm' when only examining the first three
characters of the string.

This change adds additional validation to the workaround logic to make
sure we only take the arm path when running natively, not in arm-compat.

Fixes: 256d0afb11 ("selftests/seccomp: build and pass on arm64")
Signed-off-by: Neill Kapron <nkapron@google.com>
Link: https://lore.kernel.org/r/20250427094103.3488304-2-nkapron@google.com
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-27 11:05:11 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
config selftests/seccomp: Update kernel config 2020-12-02 11:20:54 -08:00
Makefile selftests/seccomp: Fix seccomp failure by adding missing headers 2022-03-08 19:12:30 +01:00
seccomp_benchmark.c selftests/seccomp: Avoid using "sysctl" for report 2021-06-28 12:49:52 -07:00
seccomp_bpf.c selftests/seccomp: fix syscall_restart test for arm compat 2025-06-27 11:05:11 +01:00
settings selftests/seccomp: Compare bitmap vs filter overhead 2020-11-20 11:16:34 -08:00