2020-09-17 16:54:40

by Necip Fazil Yildiran

[permalink] [raw]
Subject: [PATCH] net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC

When IPV6_SEG6_HMAC is enabled and CRYPTO is disabled, it results in the
following Kbuild warning:

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

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

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

The reason is that IPV6_SEG6_HMAC selects CRYPTO_HMAC, CRYPTO_SHA1, and
CRYPTO_SHA256 without depending on or selecting CRYPTO while those configs
are subordinate to CRYPTO.

Honor the kconfig menu hierarchy to remove kconfig dependency warnings.

Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
Signed-off-by: Necip Fazil Yildiran <[email protected]>
---
net/ipv6/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
index 76bff79d6fed..747f56e0c636 100644
--- a/net/ipv6/Kconfig
+++ b/net/ipv6/Kconfig
@@ -303,6 +303,7 @@ config IPV6_SEG6_LWTUNNEL
config IPV6_SEG6_HMAC
bool "IPv6: Segment Routing HMAC support"
depends on IPV6
+ select CRYPTO
select CRYPTO_HMAC
select CRYPTO_SHA1
select CRYPTO_SHA256
--
2.25.1


2020-09-19 00:48:28

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC

From: Necip Fazil Yildiran <[email protected]>
Date: Thu, 17 Sep 2020 19:46:43 +0300

> When IPV6_SEG6_HMAC is enabled and CRYPTO is disabled, it results in the
> following Kbuild warning:
>
> WARNING: unmet direct dependencies detected for CRYPTO_HMAC
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y]
>
> WARNING: unmet direct dependencies detected for CRYPTO_SHA1
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y]
>
> WARNING: unmet direct dependencies detected for CRYPTO_SHA256
> Depends on [n]: CRYPTO [=n]
> Selected by [y]:
> - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y]
>
> The reason is that IPV6_SEG6_HMAC selects CRYPTO_HMAC, CRYPTO_SHA1, and
> CRYPTO_SHA256 without depending on or selecting CRYPTO while those configs
> are subordinate to CRYPTO.
>
> Honor the kconfig menu hierarchy to remove kconfig dependency warnings.
>
> Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
> Signed-off-by: Necip Fazil Yildiran <[email protected]>

Applied and queued up for -stable, thank you.