Skip to content

Commit 1af424b

Browse files
author
Eric Biggers
committed
lib/crypto: poly1305: Restore dependency of arch code on !KMSAN
Restore the dependency of the architecture-optimized Poly1305 code on !KMSAN. It was dropped by commit b646b78 ("lib/crypto: poly1305: Consolidate into single module"). Unlike the other hash algorithms in lib/crypto/ (e.g., SHA-512), the way the architecture-optimized Poly1305 code is integrated results in assembly code initializing memory, for several different architectures. Thus, it generates false positive KMSAN warnings. These could be suppressed with kmsan_unpoison_memory(), but it would be needed in quite a few places. For now let's just restore the dependency on !KMSAN. Note: this should have been caught by running poly1305_kunit with CONFIG_KMSAN=y, which I did. However, due to an unrelated KMSAN bug (https://lore.kernel.org/r/20251022030213.GA35717@sol/), KMSAN currently isn't working reliably. Thus, the warning wasn't noticed until later. Fixes: b646b78 ("lib/crypto: poly1305: Consolidate into single module") Reported-by: [email protected] Closes: https://lore.kernel.org/r/[email protected]/ Reported-by: Pei Xiao <[email protected]> Closes: https://lore.kernel.org/r/751b3d80293a6f599bb07770afcef24f623c7da0.1761026343.git.xiaopei01@kylinos.cn/ Reviewed-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
1 parent 211ddde commit 1af424b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/crypto/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ config CRYPTO_LIB_POLY1305
9797

9898
config CRYPTO_LIB_POLY1305_ARCH
9999
bool
100-
depends on CRYPTO_LIB_POLY1305 && !UML
100+
depends on CRYPTO_LIB_POLY1305 && !UML && !KMSAN
101101
default y if ARM
102102
default y if ARM64 && KERNEL_MODE_NEON
103103
default y if MIPS

0 commit comments

Comments
 (0)