[PATCH v4 0/2] arm64: Fix handling of tracer updates to x0 on syscall entry

From: Will Deacon

Date: Thu Jul 30 2026 - 09:34:35 EST


Hi all,

This is version 4 of the patch previously posted here:

v1: https://lore.kernel.org/r/20260714143600.23853-1-will@xxxxxxxxxx
v2: https://lore.kernel.org/r/20260716120640.6590-1-will@xxxxxxxxxx
v3: https://lore.kernel.org/r/20260717182758.17111-1-will@xxxxxxxxxx

Changes since v3 include:

- Add an additional patch to pass orig_x0 as the first syscall argument
for native tasks (Jinjie)
- Move WARN_ON_ONCE() after checking regs->syscallno (Sashiko)
- Add Tested-by from Jinjie.

Cheers,

Will

Cc: Kees Cook <kees@xxxxxxxxxx>
Cc: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>

--->8

Will Deacon (2):
arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry
arm64: syscall: Pass 'orig_x0' as first argument to native system call

arch/arm64/include/asm/syscall_wrapper.h | 13 ++++--
arch/arm64/kernel/ptrace.c | 50 ++++++++++++++++++++++++
2 files changed, 59 insertions(+), 4 deletions(-)

--
2.55.0.508.g3f0d502094-goog