Re: [PATCH v3 03/21] crypto/arm64: sm4-ce-gcm - Avoid pointless yield of the NEON unit

Eric Biggers
2025-10-17T17:06:28Z

On Wed, Oct 08, 2025 at 05:45:37PM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> Kernel mode NEON sections are now preemptible on arm64, and so there is
> no need to yield it when calling APIs that may sleep.
>
> Also, move the calls to kernel_neon_end() to the same scope as
> kernel_neon_begin(). This is needed for a subsequent change where a
> stack buffer is allocated transparently and passed to
> kernel_neon_begin().
>
> While at it, simplify the logic.
>
> Acked-by: Eric Biggers <ebiggers@kernel.org>
> [ardb: Simplify convoluted logic]
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> arch/arm64/crypto/sm4-ce-gcm-glue.c | 25 +++++---------------
> 1 file changed, 6 insertions(+), 19 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@kernel.org>

- Eric