[PATCH 0/2] kselftest/arm64: Add two arm64 kselftests for orig_x0 issue
From: Jinjie Ruan
Date: Fri Jul 17 2026 - 05:00:47 EST
Recently, a security issue related to orig_x0 was discovered and fixed
in arm64, but there are still no test cases covering it. Seccomp,
tracepoints, and audit can observe a stale value for x0 after a ptracer
or SECCOMP_RET_TRACE modifies x0.
As Kees suggested, this series adds two kselftests for arm64 that validate
the orig_x0 re-synchronisation fix in ptrace, the first one is for ptrace
update, the second one is for SECCOMP_RET_TRACE update.
Link: https://lore.kernel.org/all/20260716120640.6590-1-will@xxxxxxxxxx/
Link: https://lore.kernel.org/all/202607152004.DEA95D63@keescook/
Jinjie Ruan (2):
kselftest/arm64: Add seccomp ptrace x0 bypass test
kselftest/arm64: Add SECCOMP_RET_TRACE x0 bypass test
tools/testing/selftests/arm64/abi/.gitignore | 2 +
tools/testing/selftests/arm64/abi/Makefile | 2 +-
.../arm64/abi/seccomp_ptrace_x0_bypass.c | 181 +++++++++++++
.../arm64/abi/seccomp_ret_trace_x0_bypass.c | 249 ++++++++++++++++++
4 files changed, 433 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/arm64/abi/seccomp_ptrace_x0_bypass.c
create mode 100644 tools/testing/selftests/arm64/abi/seccomp_ret_trace_x0_bypass.c
--
2.34.1