[PATCH] arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace
Will Deacon
will at kernel.org
Thu Jan 18 04:02:24 PST 2024
On Mon, 15 Jan 2024 18:42:38 +0000, Mark Brown wrote:
> When writing ZA we currently unconditionally flush the buffer used to store
> it as part of ensuring that it is allocated. Since this buffer is shared
> with ZT0 this means that a write to ZA when PSTATE.ZA is already set will
> corrupt the value of ZT0 on a SME2 system. Fix this by only flushing the
> backing storage if PSTATE.ZA was not previously set.
>
> This will mean that short or failed writes may leave stale data in the
> buffer, this seems as correct as our current behaviour and unlikely to be
> something that userspace will rely on.
>
> [...]
Applied to arm64 (for-next/core), thanks!
[1/1] arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace
https://git.kernel.org/arm64/c/b7c510d04904
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
More information about the linux-arm-kernel
mailing list