From: Ard Biesheuvel Date: Wed, 1 Oct 2025 11:44:23 +0000 (+0200) Subject: crypto/arm64: nhpoly1305 - Switch to 'ksimd' scoped guard API X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72cb51233b59429bd9920f396d4a2e8cd1ad1a40;p=thirdparty%2Fkernel%2Flinux.git crypto/arm64: nhpoly1305 - Switch to 'ksimd' scoped guard API Switch to the more abstract 'scoped_ksimd()' API, which will be modified in a future patch to transparently allocate a kernel mode FP/SIMD state buffer on the stack, so that kernel mode FP/SIMD code remains preemptible in principe, but without the memory overhead that adds 528 bytes to the size of struct task_struct. Reviewed-by: Eric Biggers Reviewed-by: Jonathan Cameron Acked-by: Catalin Marinas Signed-off-by: Ard Biesheuvel --- diff --git a/arch/arm64/crypto/nhpoly1305-neon-glue.c b/arch/arm64/crypto/nhpoly1305-neon-glue.c index e4a0b463f080e..013de6ac569a1 100644 --- a/arch/arm64/crypto/nhpoly1305-neon-glue.c +++ b/arch/arm64/crypto/nhpoly1305-neon-glue.c @@ -25,9 +25,8 @@ static int nhpoly1305_neon_update(struct shash_desc *desc, do { unsigned int n = min_t(unsigned int, srclen, SZ_4K); - kernel_neon_begin(); - crypto_nhpoly1305_update_helper(desc, src, n, nh_neon); - kernel_neon_end(); + scoped_ksimd() + crypto_nhpoly1305_update_helper(desc, src, n, nh_neon); src += n; srclen -= n; } while (srclen);