Skip to content

Commit 54e7bb6

Browse files
author
Eric Biggers
committed
wireguard: kconfig: simplify crypto kconfig selections
Simplify the kconfig entry for WIREGUARD: - Drop the selections of the arch-optimized ChaCha20, Poly1305, BLAKE2s, and Curve25519 code. These options no longer exist, as lib/crypto/ now enables the arch-optimized code automatically. - Drop the selection of CRYPTO. This was needed only to make the arch-optimized options visible. lib/crypto/ now handles these options internally, without any dependency on CRYPTO. - Drop the dependency on !KMSAN. This was needed only to avoid selecting arch-optimized code that isn't compatible with KMSAN. lib/crypto/ now handles the !KMSAN dependencies internally. - Add a selection of CRYPTO_LIB_UTILS, since WireGuard directly calls crypto_memneq(). This gets selected indirectly by CRYPTO_LIB_CURVE25519 and CRYPTO_LIB_CHACHA20POLY1305 anyway, but it's best to make this dependency explicit. Link: https://lore.kernel.org/r/20250906213523.84915-13-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent cb2d6b1 commit 54e7bb6

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

drivers/net/Kconfig

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,11 @@ config WIREGUARD
7676
tristate "WireGuard secure network tunnel"
7777
depends on NET && INET
7878
depends on IPV6 || !IPV6
79-
depends on !KMSAN # KMSAN doesn't support the crypto configs below
8079
select NET_UDP_TUNNEL
8180
select DST_CACHE
82-
select CRYPTO
8381
select CRYPTO_LIB_CURVE25519
8482
select CRYPTO_LIB_CHACHA20POLY1305
85-
select CRYPTO_CHACHA20_X86_64 if X86 && 64BIT
86-
select CRYPTO_POLY1305_X86_64 if X86 && 64BIT
87-
select CRYPTO_BLAKE2S_X86 if X86 && 64BIT
88-
select CRYPTO_CURVE25519_X86 if X86 && 64BIT
89-
select CRYPTO_CHACHA20_NEON if ARM || (ARM64 && KERNEL_MODE_NEON)
90-
select CRYPTO_POLY1305_NEON if ARM64 && KERNEL_MODE_NEON
91-
select CRYPTO_POLY1305_ARM if ARM
92-
select CRYPTO_BLAKE2S_ARM if ARM
93-
select CRYPTO_CURVE25519_NEON if ARM && KERNEL_MODE_NEON
94-
select CRYPTO_CHACHA_MIPS if CPU_MIPS32_R2
95-
select CRYPTO_POLY1305_MIPS if MIPS
96-
select CRYPTO_CHACHA_S390 if S390
83+
select CRYPTO_LIB_UTILS
9784
help
9885
WireGuard is a secure, fast, and easy to use replacement for IPSec
9986
that uses modern cryptography and clever networking tricks. It's

0 commit comments

Comments
 (0)