From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 085A03054DF; Tue, 11 Nov 2025 01:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762825504; cv=none; b=S4AOqCxMjmxPXadNv5J4ddkUMts+RuvZ9pSv1VE25J4EDkbIVEba95t7kV20gAZ+dZ5a/5QbVypwlWMKWV6YWiXfY8DkybtdPVtgWVZHFLRFK/bgcTuWikmkITsF+HR2OGWZMppxcVOe6sodAYwjc3VsiFA+T0Y8tApNQEBs9bQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762825504; c=relaxed/simple; bh=g1Nxlx/F2XWa576eVsrF+O87w0ALUIGR0zxZ8cDImik=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YiAVQW51SxyYQrUKAIVqbQjacjh/DCLLG+++8x76R/Dk5Q4UcWV8raJp1ScmbILBzgP7dZaapZyAKUbQvzjJvjPLh+KhoX2zOfbhWNho+4ZVY8w9vv3ZOtE7TbJExBUaLEoZoTfiHuW2qk+/vwCmx3BJp9uIhe3YInO2D4kOyfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gi2O30IY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gi2O30IY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71A8AC19424; Tue, 11 Nov 2025 01:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762825503; bh=g1Nxlx/F2XWa576eVsrF+O87w0ALUIGR0zxZ8cDImik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gi2O30IYPK7iDjES87zjTeL5HU/IE9m//0f64+fRr8jwxHVckvDVLpXXq7oIw6VMU D1EF0UADpvkxeLXfnYUJdvBgVE32YAncEP3oNu4J+BOzGcDFJdONdqRKM1LJlW1/Ih 4w2477BUDjh3Z8C+z6yebEYQRH6y5zbYf9iBUpmA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nathan Chancellor , Ard Biesheuvel , Eric Biggers Subject: [PATCH 6.17 830/849] lib/crypto: curve25519-hacl64: Fix older clang KASAN workaround for GCC Date: Tue, 11 Nov 2025 09:46:40 +0900 Message-ID: <20251111004556.493788997@linuxfoundation.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251111004536.460310036@linuxfoundation.org> References: <20251111004536.460310036@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nathan Chancellor 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 Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20251103-curve25519-hacl64-fix-kasan-workaround-v2-1-ab581cbd8035@kernel.org Signed-off-by: Eric Biggers Signed-off-by: Greg Kroah-Hartman --- lib/crypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/crypto/Makefile +++ b/lib/crypto/Makefile @@ -48,7 +48,7 @@ libcurve25519-generic-y := curve25519 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