Skip to content

Commit 798983f

Browse files
nathanchancegregkh
authored andcommitted
lib/crypto: curve25519-hacl64: Fix older clang KASAN workaround for GCC
commit 2b81082ad37cc3f28355fb73a6a69b91ff7dbf20 upstream. Commit 2f13dae ("lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older") inadvertently disabled KASAN in curve25519-hacl64.o for GCC unconditionally because clang-min-version will always evaluate to nothing for GCC. Add a check for CONFIG_CC_IS_CLANG to avoid applying the workaround for GCC, which is only needed for clang-17 and older. Cc: [email protected] Fixes: 2f13dae ("lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older") Signed-off-by: Nathan Chancellor <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/20251103-curve25519-hacl64-fix-kasan-workaround-v2-1-ab581cbd8035@kernel.org Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1f05ead commit 798983f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/crypto/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ libcurve25519-generic-y := curve25519-fiat32.o
4848
libcurve25519-generic-$(CONFIG_ARCH_SUPPORTS_INT128) := curve25519-hacl64.o
4949
libcurve25519-generic-y += curve25519-generic.o
5050
# clang versions prior to 18 may blow out the stack with KASAN
51-
ifeq ($(call clang-min-version, 180000),)
51+
ifeq ($(CONFIG_CC_IS_CLANG)_$(call clang-min-version, 180000),y_)
5252
KASAN_SANITIZE_curve25519-hacl64.o := n
5353
endif
5454

0 commit comments

Comments
 (0)