Skip to contentSkip to conversation

wireguard: Kconfig: select CRYPTO_CHACHA_S390

PATCH In review Vladis Dronov 2 participants 5 messages Jul 4, 2022 – Jul 5, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wireguard: Kconfig: select CRYPTO_CHACHA_S390

Select the new implementation of CHACHA20 for S390 when available, it is faster than the generic software implementation.

---
 drivers/net/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/Kconfig +1 -0
index b2a4f998c180..8c1eeb5a8db8 100644
@@ -94,6 +94,7 @@ config WIREGUARD
 	select CRYPTO_CURVE25519_NEON if ARM && KERNEL_MODE_NEON
 	select CRYPTO_CHACHA_MIPS if CPU_MIPS32_R2
 	select CRYPTO_POLY1305_MIPS if MIPS
+	select CRYPTO_CHACHA_S390 if S390
 	help
 	  WireGuard is a secure, fast, and easy to use replacement for IPSec
 	  that uses modern cryptography and clever networking tricks. It's
Signature · 1 line
2.36.1
#1 lore raw

Hi Vladis,

Quoted 24 lines · Vladis Dronov

Select the new implementation of CHACHA20 for S390 when available, it is faster than the generic software implementation.

---
 drivers/net/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/Kconfig +1 -0
index b2a4f998c180..8c1eeb5a8db8 100644
@@ -94,6 +94,7 @@ config WIREGUARD
 	select CRYPTO_CURVE25519_NEON if ARM && KERNEL_MODE_NEON
 	select CRYPTO_CHACHA_MIPS if CPU_MIPS32_R2
 	select CRYPTO_POLY1305_MIPS if MIPS
+	select CRYPTO_CHACHA_S390 if S390
 	help
 	  WireGuard is a secure, fast, and easy to use replacement for IPSec
 	  that uses modern cryptography and clever networking tricks. It's
Signature · 1 line
2.36.1

Thanks for the patch. Queued up as:
https://git.zx2c4.com/wireguard-linux/commit/?id=1b4ab028730cd00c144eaa51160865504b780961

I'll include this in my series to net.git soon.

Regards,
Jason

#2 lore raw
Quoted 31 lines · Jason A. Donenfeld

Hi Vladis,

Quoted 24 lines · Vladis Dronov

Select the new implementation of CHACHA20 for S390 when available, it is faster than the generic software implementation.

---
 drivers/net/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/Kconfig +1 -0
index b2a4f998c180..8c1eeb5a8db8 100644
@@ -94,6 +94,7 @@ config WIREGUARD
 	select CRYPTO_CURVE25519_NEON if ARM && KERNEL_MODE_NEON
 	select CRYPTO_CHACHA_MIPS if CPU_MIPS32_R2
 	select CRYPTO_POLY1305_MIPS if MIPS
+	select CRYPTO_CHACHA_S390 if S390
 	help
 	  WireGuard is a secure, fast, and easy to use replacement for IPSec
 	  that uses modern cryptography and clever networking tricks. It's
Signature · 1 line
2.36.1

Thanks for the patch. Queued up as:
https://git.zx2c4.com/wireguard-linux/commit/?id=1b4ab028730cd00c144eaa51160865504b780961

Quoted 1 line

I'll include this in my series to net.git soon.

This actually leads to a minor problem:

WARNING: unmet direct dependencies detected for CRYPTO_CHACHA_S390

    Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=n] && S390 [=y]

This is of course harmless, since this doesn't *actually* depend on CRYPTO_HW. In fact, the dependency on CRYPTO_HW is entirely a mistake here that was repeated a few times. I cleaned this up and fixed it in this patch:

    https://lore.kernel.org/linux-crypto/[email protected]/

So hopefully Herbert will take that for 5.19 and then we'll be all set here.

Jason

#3 lore raw

Hi,

Quoted 13 lines · Jason A. Donenfeld
Quoted 11 lines · Jason A. Donenfeld

Hi Vladis,

Quoted 7 lines · Vladis Dronov

Select the new implementation of CHACHA20 for S390 when available, it is faster than the generic software implementation.

... skip ...

Quoted 4 lines
Quoted 4 lines

Thanks for the patch. Queued up as:
https://git.zx2c4.com/wireguard-linux/commit/?id=1b4ab028730cd00c144eaa51160865504b780961

I'll include this in my series to net.git soon.

Thanks a ton, Jason!
Most appreciated.

Quoted 10 lines

This actually leads to a minor problem:

WARNING: unmet direct dependencies detected for CRYPTO_CHACHA_S390

    Depends on [n]: CRYPTO [=y] && CRYPTO_HW [=n] && S390 [=y]

This is of course harmless, since this doesn't *actually* depend on CRYPTO_HW. In fact, the dependency on CRYPTO_HW is entirely a mistake here that was repeated a few times. I cleaned this up and fixed it in this patch:

Quoted 6 lines
    https://lore.kernel.org/linux-crypto/[email protected]/

So hopefully Herbert will take that for 5.19 and then we'll be all set here.

Jason

Whoa, that's... funny. Honestly, I was always wondering why CRYPTO_CHACHA_S390 and friends live in drivers/crypto/Kconfig. Now I know why. The patch looks great, thank you.

Best regards,
Vladis Dronov | Red Hat, Inc. | The Core Kernel | Senior Software Engineer

#4 lore raw

Hi Vlad,

Quoted 2 lines · Vlad Dronov

Whoa, that's... funny. Honestly, I was always wondering why CRYPTO_CHACHA_S390 and friends live in drivers/crypto/Kconfig. Now I know why.

Well... now you know that somebody else thought it was strange too. But not quite why. At least I don't know why, other than assuming it was a simple human mistake. But maybe the s390 developers will have an interesting explanation or something. Herbert CC'd them into that thread, so I look forward to seeing their response (if any).

Jason