Re: [PATCH] arm64/fpsimd: ptrace: zero target's fpsimd_state, not the tracer's
From: Catalin Marinas
Date: Wed May 06 2026 - 07:18:12 EST
On Tue, 05 May 2026 09:02:13 -0700, Breno Leitao wrote:
> sve_set_common() is the backend for PTRACE_SETREGSET(NT_ARM_SVE) and
> PTRACE_SETREGSET(NT_ARM_SSVE). Every write in the function operates on
> the tracee (target) - except a single memset that uses current instead,
> zeroing the tracer's saved V0-V31 / FPSR / FPCR shadow on every ptrace
> SETREGSET call.
>
> The memset is meant to give the tracee a defined zero register image
> before the user-supplied payload is copied in (for partial writes,
> header-only writes, and FPSIMD<->SVE format switches). Aiming it at
> current both denies the tracee that clean slate and silently corrupts
> the tracer.
>
> [...]
Applied to arm64 (for-next/fixes). Also fixed the commit log and added
cc stable. Thanks!
[1/1] arm64/fpsimd: ptrace: zero target's fpsimd_state, not the tracer's
https://git.kernel.org/arm64/c/5cbb61bf4168