[PATCH net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO

Eric Biggers posted 1 patch 1 week, 2 days ago
Failed in applying to current master (apply log)
net/mptcp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO
Posted by Eric Biggers 1 week, 2 days ago
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.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 net/mptcp/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
index 20328920f6ed..be71fc9b4638 100644
--- a/net/mptcp/Kconfig
+++ b/net/mptcp/Kconfig
@@ -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
-- 
2.52.0
Re: [PATCH net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO
Posted by patchwork-bot+netdevbpf@kernel.org 4 days, 14 hours ago
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO
Posted by Mat Martineau 1 week, 1 day ago
On Wed, 3 Dec 2025, Eric Biggers 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.
>
> 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.
>
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> 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.

Reviewed-by: Mat Martineau <martineau@kernel.org>


>
> diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
> index 20328920f6ed..be71fc9b4638 100644
> --- a/net/mptcp/Kconfig
> +++ b/net/mptcp/Kconfig
> @@ -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
> -- 
> 2.52.0
>
>
Re: [PATCH net] mptcp: select CRYPTO_LIB_UTILS instead of CRYPTO
Posted by MPTCP CI 1 week, 1 day ago
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)