summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2025-11-03 12:11:24 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:37:47 -0500
commit798983faa23308098a3b51287ab62d0437c994bd (patch)
treefb9f8189a3658d5d229918434f8882302bdb67e6 /lib
parent1f05ead877ff383e59c7952f4ab705fcb5eefd6e (diff)
downloadlinux-798983faa23308098a3b51287ab62d0437c994bd.tar.gz
linux-798983faa23308098a3b51287ab62d0437c994bd.tar.bz2
linux-798983faa23308098a3b51287ab62d0437c994bd.zip
lib/crypto: curve25519-hacl64: Fix older clang KASAN workaround for GCC
commit 2b81082ad37cc3f28355fb73a6a69b91ff7dbf20 upstream. Commit 2f13daee2a72 ("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: stable@vger.kernel.org Fixes: 2f13daee2a72 ("lib/crypto/curve25519-hacl64: Disable KASAN with clang-17 and older") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20251103-curve25519-hacl64-fix-kasan-workaround-v2-1-ab581cbd8035@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index 539d5d59a50e..a8d73293d982 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -48,7 +48,7 @@ libcurve25519-generic-y := curve25519-fiat32.o
libcurve25519-generic-$(CONFIG_ARCH_SUPPORTS_INT128) := curve25519-hacl64.o
libcurve25519-generic-y += curve25519-generic.o
# clang versions prior to 18 may blow out the stack with KASAN
-ifeq ($(call clang-min-version, 180000),)
+ifeq ($(CONFIG_CC_IS_CLANG)_$(call clang-min-version, 180000),y_)
KASAN_SANITIZE_curve25519-hacl64.o := n
endif