linux/lib/crypto
Eric Biggers 1af424b154 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 b646b782e5 ("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: b646b782e5 ("lib/crypto: poly1305: Consolidate into single module")
Reported-by: syzbot+01fcd39a0d90cdb0e3df@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/68f6a48f.050a0220.91a22.0452.GAE@google.com/
Reported-by: Pei Xiao <xiaopei01@kylinos.cn>
Closes: https://lore.kernel.org/r/751b3d80293a6f599bb07770afcef24f623c7da0.1761026343.git.xiaopei01@kylinos.cn/
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251022033405.64761-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2025-10-22 10:52:10 -07:00
..
arm lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
arm64 Optimize fsverity with 2-way interleaved hashing 2025-09-29 15:55:20 -07:00
mips lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
mpi lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
powerpc lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
riscv lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
s390 lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
sparc lib/crypto: Drop inline from all *_mod_init_arch() functions 2025-08-27 08:15:35 -07:00
tests Optimize fsverity with 2-way interleaved hashing 2025-09-29 15:55:20 -07:00
x86 Optimize fsverity with 2-way interleaved hashing 2025-09-29 15:55:20 -07:00
aes.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
aescfb.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
aesgcm.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
arc4.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
blake2s.c lib/crypto: blake2s: Consolidate into single C translation unit 2025-08-29 09:50:19 -07:00
chacha-block-generic.c lib/crypto: chacha: Rename chacha.c to chacha-block-generic.c 2025-08-29 09:50:19 -07:00
chacha.c lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
chacha20poly1305-selftest.c crypto: lib/chacha - strongly type the ChaCha state 2025-05-12 13:32:53 +08:00
chacha20poly1305.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
curve25519-fiat32.c
curve25519-hacl64.c
curve25519.c lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
des.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
gf128mul.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
hash_info.c lib/crypto: hash_info: Move hash_info.c into lib/crypto/ 2025-07-08 12:03:44 -07:00
Kconfig lib/crypto: poly1305: Restore dependency of arch code on !KMSAN 2025-10-22 10:52:10 -07:00
Makefile lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
md5.c lib/crypto: md5: Add MD5 and HMAC-MD5 library functions 2025-08-26 12:52:27 -04:00
memneq.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
poly1305-donna32.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
poly1305-donna64.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
poly1305.c lib/crypto: poly1305: Consolidate into single module 2025-08-29 09:49:18 -07:00
sha1.c lib/crypto: sha1: Add HMAC support 2025-07-14 08:59:20 -07:00
sha256.c lib/crypto: sha256: Add support for 2-way interleaved hashing 2025-09-17 13:09:39 -05:00
sha512.c lib/crypto: sha2: Add hmac_sha*_init_usingrawkey() 2025-07-14 08:20:37 -07:00
simd.c
sm3.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00
utils.c lib/crypto: Explicitly include <linux/export.h> 2025-06-30 09:26:19 -07:00