Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ebiggers@kernel.org>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

+2 -3
+2 -3
arch/arm64/crypto/nhpoly1305-neon-glue.c
··· 25 25 do { 26 26 unsigned int n = min_t(unsigned int, srclen, SZ_4K); 27 27 28 - kernel_neon_begin(); 29 - crypto_nhpoly1305_update_helper(desc, src, n, nh_neon); 30 - kernel_neon_end(); 28 + scoped_ksimd() 29 + crypto_nhpoly1305_update_helper(desc, src, n, nh_neon); 31 30 src += n; 32 31 srclen -= n; 33 32 } while (srclen);