Skip to content

Commit 5164715

Browse files
committed
Merge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library fixes from Eric Biggers: - Fix a performance issue with the scoped_ksimd() macro (new in 6.19) where it unnecessarily initialized the entire fpsimd state. - Add a missing gitignore entry for a generated file added in 6.18. * tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto: riscv: Add poly1305-core.S to .gitignore arm64/simd: Avoid pointless clearing of FP/SIMD buffer
2 parents 5caa380 + 5a0b188 commit 5164715

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

arch/arm64/include/asm/simd.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ DEFINE_LOCK_GUARD_1(ksimd,
4848
kernel_neon_begin(_T->lock),
4949
kernel_neon_end(_T->lock))
5050

51-
#define scoped_ksimd() scoped_guard(ksimd, &(struct user_fpsimd_state){})
51+
#define __scoped_ksimd(_label) \
52+
for (struct user_fpsimd_state __uninitialized __st; \
53+
true; ({ goto _label; })) \
54+
if (0) { \
55+
_label: break; \
56+
} else scoped_guard(ksimd, &__st)
57+
58+
#define scoped_ksimd() __scoped_ksimd(__UNIQUE_ID(label))
5259

5360
#endif

lib/crypto/riscv/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
poly1305-core.S

0 commit comments

Comments
 (0)