Skip to contentSkip to conversation

mptcp: select CRYPTO

RFC PATCH In review Matthieu Baerts 2 participants 3 messages Feb 12, 2020

Subsystems (2)
lore
Share & tools
lore

Matthieu Baerts

author
#0 lore raw

RFC PATCH 1/1 mptcp: select CRYPTO

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 depends on CRYPTO. CRYPTO is now selected to avoid this issue.

Fixes 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
 net/mptcp/Kconfig | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/Kconfig +1 -0
index 49f6054e7f4e..a9ed3bf1d93f 100644
@@ -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
Signature · 1 line
2.25.0
#1 lore raw
Quoted 31 lines · Matthieu Baerts

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 depends on CRYPTO. CRYPTO is now selected to avoid this issue.

Fixes 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>

---
net/mptcp/Kconfig | 1 +

1 file changed, 1 insertion(+)
net/mptcp/Kconfig +1 -0
index 49f6054e7f4e..a9ed3bf1d93f 100644
@@ -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
Signature · 1 line
2.25.0

Even though the config system prints that warning, it looks like sha256 is compiled and linked even without CONFIG_CRYPTO. Since we end up needing CONFIG_CRYPTO anyway for crypto_memneq, it's not bad to include it now, but it doesn't seem to be strictly necessary.

--
Mat Martineau
Intel

author
#2 lore raw

Hi Mat,

Quoted 31 lines · Mat Martineau
Quoted 29 lines · Matthieu Baerts

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 depends on CRYPTO. CRYPTO is now selected to avoid this issue.

Fixes 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
Signed-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>

---
net/mptcp/Kconfig | 1 +

1 file changed, 1 insertion(+)
net/mptcp/Kconfig +0 -0
index 49f6054e7f4e..a9ed3bf1d93f 100644
@@ -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

Quoted 8 lines
Quoted 3 lines

      subflows in order to utilize multiple network paths. Each subflow

Signature · 1 line
2.25.0

Even though the config system prints that warning, it looks like sha256 is compiled and linked even without CONFIG_CRYPTO. Since we end up needing CONFIG_CRYPTO anyway for crypto_memneq, it's not bad to include it now, but it doesn't seem to be strictly necessary.

Thank you for the review.

I agree with you. I don't even know where the dependence is added. In the code, we can see:

config CRYPTO_LIB_SHA256
tristate

But "make menuconfig" shows the dependence with CRYPTO.

Do you think we don't need to send it to "net"? Maybe I should add something like this in the commit message?

Even though the config system prints that warning, it looks like
sha256 is compiled and linked even without CONFIG_CRYPTO. Since we will end up needing CONFIG_CRYPTO anyway in future commits that will be sent for the next version, we propose to add it now to fix the warning and prepare for the next commits.

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium