From: Julian Braha <julianbraha@gmail.com>
To: herbert@gondor.apana.org.au, davem@davemloft.net
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
fazilyildiran@gmail.com
Subject: [PATCH] crypto: fix unmet dependency on CRYPTO for CRYPTO_LIB_CHACHA_GENERIC
Date: Mon, 17 Jan 2022 01:42:48 -0500 [thread overview]
Message-ID: <20220117064248.102638-1-julianbraha@gmail.com> (raw)
When CRYPTO_LIB_CHACHA is selected,
and CRYPTO is not selected,
Kbuild gives the following warning:
WARNING: unmet direct dependencies detected for CRYPTO_LIB_CHACHA_GENERIC
Depends on [n]: CRYPTO [=n]
Selected by [y]:
- CRYPTO_LIB_CHACHA [=y] && (CRYPTO_ARCH_HAVE_LIB_CHACHA [=n] || !CRYPTO_ARCH_HAVE_LIB_CHACHA [=n]) && CRYPTO_ARCH_HAVE_LIB_CHACHA [=n]=n
This is because CRYPTO_LIB_CHACHA selects CRYPTO_LIB_CHACHA_GENERIC,
without selecting or depending on CRYPTO, despite
CRYPTO_LIB_CHACHA_GENERIC depending on CRYPTO.
This unmet dependency bug was detected by Kismet,
a static analysis tool for Kconfig. Please advise
if this is not the appropriate solution.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
lib/crypto/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
index 179041b60294..4b4f5062ccc0 100644
--- a/lib/crypto/Kconfig
+++ b/lib/crypto/Kconfig
@@ -33,6 +33,7 @@ config CRYPTO_ARCH_HAVE_LIB_CHACHA
config CRYPTO_LIB_CHACHA_GENERIC
tristate
+ depends on CRYPTO
select CRYPTO_ALGAPI
help
This symbol can be depended upon by arch implementations of the
@@ -44,6 +45,7 @@ config CRYPTO_LIB_CHACHA_GENERIC
config CRYPTO_LIB_CHACHA
tristate "ChaCha library interface"
depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
+ depends on CRYPTO
select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
help
Enable the ChaCha library interface. This interface may be fulfilled
@@ -114,6 +116,7 @@ config CRYPTO_LIB_CHACHA20POLY1305
tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
+ depends on CRYPTO
select CRYPTO_LIB_CHACHA
select CRYPTO_LIB_POLY1305
--
2.32.0
next reply other threads:[~2022-01-17 6:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 6:42 Julian Braha [this message]
2022-01-18 1:29 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220117064248.102638-1-julianbraha@gmail.com \
--to=julianbraha@gmail.com \
--cc=davem@davemloft.net \
--cc=fazilyildiran@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®