[PATCH] arm64: sme: Use STR P to clear FFR context field in streaming SVE mode

Catalin Marinas catalin.marinas at arm.com
Wed Jun 28 10:24:53 PDT 2023


On Wed, 28 Jun 2023 16:56:05 +0100, Will Deacon wrote:
> The FFR is a predicate register which can vary between 16 and 256 bits
> in size depending upon the configured vector length. When saving the
> SVE state in streaming SVE mode, the FFR register is inaccessible and
> so commit 9f5848665788 ("arm64/sve: Make access to FFR optional") simply
> clears the FFR field of the in-memory context structure. Unfortunately,
> it achieves this using an unconditional 8-byte store and so if the SME
> vector length is anything other than 64 bytes in size we will either
> fail to clear the entire field or, worse, we will corrupt memory
> immediately following the structure. This has led to intermittent kfence
> splats in CI [1] and can trigger kmalloc Redzone corruption messages
> when running the 'fp-stress' kselftest:
> 
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] arm64: sme: Use STR P to clear FFR context field in streaming SVE mode
      https://git.kernel.org/arm64/c/1c297ec19245

-- 
Catalin




More information about the linux-arm-kernel mailing list