diff mbox series

[net] mptcp: select CRYPTO

Message ID 20200215144556.956173-1-matthieu.baerts@tessares.net
State Deferred, archived
Headers show
Series [net] mptcp: select CRYPTO | expand

Commit Message

Matthieu Baerts Feb. 15, 2020, 2:45 p.m. UTC
Without this modification and if CRYPTO is not selected, we have this
warning:

  WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
    Depends on [n]: CRYPTO [=n]
    Selected by [y]:
    - MPTCP [=y] && NET [=y] && INET [=y]

MPTCP selects CRYPTO_LIB_SHA256 which seems to depend on CRYPTO. CRYPTO
is now selected to avoid this issue.

Even though the config system prints that warning, it looks like
sha256.c is compiled and linked even without CONFIG_CRYPTO. Since MPTCP
will end up needing CONFIG_CRYPTO anyway in future commits -- currently
in preparation for net-next -- we propose to add it now to fix the
warning.

The dependency in the config system comes from the fact that
CRYPTO_LIB_SHA256 is defined in "lib/crypto/Kconfig" which is sourced
from "crypto/Kconfig" only if CRYPTO is selected.

Fixes: 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Feb. 17, 2020, 3:37 a.m. UTC | #1
From: Matthieu Baerts <matthieu.baerts@tessares.net>
Date: Sat, 15 Feb 2020 15:45:56 +0100

> Without this modification and if CRYPTO is not selected, we have this
> warning:
> 
>   WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
>     Depends on [n]: CRYPTO [=n]
>     Selected by [y]:
>     - MPTCP [=y] && NET [=y] && INET [=y]
> 
> MPTCP selects CRYPTO_LIB_SHA256 which seems to depend on CRYPTO. CRYPTO
> is now selected to avoid this issue.
> 
> Even though the config system prints that warning, it looks like
> sha256.c is compiled and linked even without CONFIG_CRYPTO. Since MPTCP
> will end up needing CONFIG_CRYPTO anyway in future commits -- currently
> in preparation for net-next -- we propose to add it now to fix the
> warning.
> 
> The dependency in the config system comes from the fact that
> CRYPTO_LIB_SHA256 is defined in "lib/crypto/Kconfig" which is sourced
> from "crypto/Kconfig" only if CRYPTO is selected.
> 
> Fixes: 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Applied.
diff mbox series

Patch

diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
index 49f6054e7f4e..a9ed3bf1d93f 100644
--- a/net/mptcp/Kconfig
+++ b/net/mptcp/Kconfig
@@ -4,6 +4,7 @@  config MPTCP
 	depends on INET
 	select SKB_EXTENSIONS
 	select CRYPTO_LIB_SHA256
+	select CRYPTO
 	help
 	  Multipath TCP (MPTCP) connections send and receive data over multiple
 	  subflows in order to utilize multiple network paths. Each subflow