mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
lib/crypto: curve25519-hacl64: Fix older clang KASAN workaround for GCC
commit2b81082ad3upstream. Commit2f13daee2a("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:2f13daee2a("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
82fe780654
commit
c664eb1166
@@ -34,7 +34,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user