Skip to contentSkip to conversation

mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO

PATCH Applied Eric Biggers 4 participants 4 messages Dec 4, 2025 – Dec 9, 2025

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

PATCH 1/1 mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO

Since the only crypto functions used by the mptcp code are the SHA-256 library functions and crypto_memneq(), select only the options needed for those: CRYPTO_LIB_SHA256 and CRYPTO_LIB_UTILS.

Previously, CRYPTO was selected instead of CRYPTO_LIB_UTILS. That does pull in CRYPTO_LIB_UTILS as well, but it's unnecessarily broad.

Years ago, the CRYPTO_LIB_* options were visible only when CRYPTO. That may be another reason why CRYPTO is selected here. However, that was fixed years ago, and the libraries can now be selected directly.

---
 net/mptcp/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/Kconfig +1 -1
index 20328920f6ed..be71fc9b4638 100644
@@ -2,11 +2,11 @@
 config MPTCP
 	bool "MPTCP: Multipath TCP"
 	depends on INET
 	select SKB_EXTENSIONS
 	select CRYPTO_LIB_SHA256
-	select CRYPTO
+	select CRYPTO_LIB_UTILS
 	help
 	  Multipath TCP (MPTCP) connections send and receive data over multiple
 	  subflows in order to utilize multiple network paths. Each subflow
 	  uses the TCP protocol, and TCP options carry header information for
 	  MPTCP.

base-commit: b2c27842ba853508b0da00187a7508eb3a96c8f7

Signature · 1 line
2.52.0
#1 lore raw

Hi Eric,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_simult_flows 🔴
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/19965132984

Initiator: Matthieu Baerts (NGI0)
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/b6994db22b86
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1030329

If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

https://github.com/multipath-tcp/mptcp-upstream-virtme-docker

Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Eric Biggers
Quoted 7 lines · Eric Biggers

Since the only crypto functions used by the mptcp code are the SHA-256 library functions and crypto_memneq(), select only the options needed for those: CRYPTO_LIB_SHA256 and CRYPTO_LIB_UTILS.

Previously, CRYPTO was selected instead of CRYPTO_LIB_UTILS. That does pull in CRYPTO_LIB_UTILS as well, but it's unnecessarily broad.

Quoted 8 lines

Years ago, the CRYPTO_LIB_* options were visible only when CRYPTO. That may be another reason why CRYPTO is selected here. However, that was fixed years ago, and the libraries can now be selected directly.

---
net/mptcp/Kconfig | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Eric!

Yes, this is a case of our Kconfig predating CRYPTO_LIB_UTILS. Appreciate the fix.

Netdev maintainers, it's fine to apply this directly to the -net tree.

Quoted 24 lines
net/mptcp/Kconfig +0 -0
index 20328920f6ed..be71fc9b4638 100644
@@ -2,11 +2,11 @@

config MPTCP
bool "MPTCP: Multipath TCP"
depends on INET
select SKB_EXTENSIONS
select CRYPTO_LIB_SHA256

net/mptcp/Kconfig +1 -1
-	select CRYPTO
+	select CRYPTO_LIB_UTILS

help
Multipath TCP (MPTCP) connections send and receive data over multiple subflows in order to utilize multiple network paths. Each subflow uses the TCP protocol, and TCP options carry header information for MPTCP.

base-commit: b2c27842ba853508b0da00187a7508eb3a96c8f7

Signature · 1 line
2.52.0
#3 lore raw
In reply to Eric Biggers
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 3 Dec 2025 21:44:17 -0800 you wrote:

Since the only crypto functions used by the mptcp code are the SHA-256 library functions and crypto_memneq(), select only the options needed for those: CRYPTO_LIB_SHA256 and CRYPTO_LIB_UTILS.

Previously, CRYPTO was selected instead of CRYPTO_LIB_UTILS. That does pull in CRYPTO_LIB_UTILS as well, but it's unnecessarily broad.

[...]

Here is the summary with links:
- [net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO

    https://git.kernel.org/netdev/net/c/e9e5047df953

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html