summaryrefslogtreecommitdiff
path: root/lib/crypto/arm/curve25519.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-10-01 13:29:23 +0200
committerArd Biesheuvel <ardb@kernel.org>2025-11-12 09:51:13 +0100
commitf53d18a4e67eacf665e9d60727d508387f84327b (patch)
tree94fbda6d3ab2c319d07158593c5b9fcac4e504c6 /lib/crypto/arm/curve25519.h
parent814f5415d3e3084eeb0550acdee5eca8b4966055 (diff)
lib/crypto: Switch ARM and arm64 to 'ksimd' scoped guard API
Before modifying the prototypes of kernel_neon_begin() and kernel_neon_end() to accommodate kernel mode FP/SIMD state buffers allocated on the stack, move arm64 to the new 'ksimd' scoped guard API, which encapsulates the calls to those functions. For symmetry, do the same for 32-bit ARM too. 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>
Diffstat (limited to 'lib/crypto/arm/curve25519.h')
-rw-r--r--lib/crypto/arm/curve25519.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/crypto/arm/curve25519.h b/lib/crypto/arm/curve25519.h
index f6d66494eb8f..b1a566885e95 100644
--- a/lib/crypto/arm/curve25519.h
+++ b/lib/crypto/arm/curve25519.h
@@ -25,9 +25,8 @@ static void curve25519_arch(u8 out[CURVE25519_KEY_SIZE],
const u8 point[CURVE25519_KEY_SIZE])
{
if (static_branch_likely(&have_neon) && crypto_simd_usable()) {
- kernel_neon_begin();
- curve25519_neon(out, scalar, point);
- kernel_neon_end();
+ scoped_ksimd()
+ curve25519_neon(out, scalar, point);
} else {
curve25519_generic(out, scalar, point);
}