[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251003202849.GB24598@quark>
Date: Fri, 3 Oct 2025 13:28:49 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Ard Biesheuvel <ardb+git@...gle.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, herbert@...dor.apana.org.au,
linux@...linux.org.uk, Ard Biesheuvel <ardb@...nel.org>,
Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Kees Cook <keescook@...omium.org>,
Catalin Marinas <catalin.marinas@....com>,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v2 00/20] arm64: Move kernel mode FPSIMD buffer to the
stack
On Wed, Oct 01, 2025 at 11:02:02PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@...nel.org>
>
> Move the buffer for preserving/restoring the kernel mode FPSIMD state on a
> context switch out of struct thread_struct, and onto the stack, so that
> the memory cost is not imposed needlessly on all tasks in the system.
>
> Changes since v1:
> - Add a patch reverting the arm64 support for the generic
> kernel_fpu_begin()/end() API, which is problematic on arm64.
>
> - Introduce a new 'ksimd' scoped guard that encapsulates the calls the
> kernel_neon_begin() and kernel_neon_end() at a higher level of
> abstraction. This makes it straight-forward to plumb in the stack
> buffer without complicating the callers.
>
> - Move all kernel mode NEON users on arm64 (and some on ARM) over to the
> new API.
>
> - Add Mark's ack to patches #6 - #8
>
> Cc: Marc Zyngier <maz@...nel.org>
> Cc: Will Deacon <will@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Eric Biggers <ebiggers@...nel.org>
>
> Ard Biesheuvel (20):
> arm64: Revert support for generic kernel mode FPU
> arm64/simd: Add scoped guard API for kernel mode SIMD
> ARM/simd: Add scoped guard API for kernel mode SIMD
> crypto: aegis128-neon - Move to more abstract 'ksimd' guard API
> raid6: Move to more abstract 'ksimd' guard API
> crypto/arm64: aes-ce-ccm - Avoid pointless yield of the NEON unit
> crypto/arm64: sm4-ce-ccm - Avoid pointless yield of the NEON unit
> crypto/arm64: sm4-ce-gcm - Avoid pointless yield of the NEON unit
> lib/crc: Switch ARM and arm64 to 'ksimd' scoped guard API
> lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API
> crypto/arm64: aes-ccm - Switch to 'ksimd' scoped guard API
> crypto/arm64: aes-blk - Switch to 'ksimd' scoped guard API
> crypto/arm64: aes-gcm - Switch to 'ksimd' scoped guard API
> crypto/arm64: nhpoly1305 - Switch to 'ksimd' scoped guard API
> crypto/arm64: polyval - Switch to 'ksimd' scoped guard API
> crypto/arm64: sha3 - Switch to 'ksimd' scoped guard API
> crypto/arm64: sm3 - Switch to 'ksimd' scoped guard API
> crypto/arm64: sm4 - Switch to 'ksimd' scoped guard API
> arm64/xorblocks: Switch to 'ksimd' scoped guard API
> arm64/fpsimd: Allocate kernel mode FP/SIMD buffers on the stack
Reviewed-by: Eric Biggers <ebiggers@...nel.org>
- Eric
Powered by blists - more mailing lists