From: Jarkko Sakkinen <jarkko@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Arnaud Ebalard <arno@natisbad.org>,
Srujana Challa <schalla@marvell.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
David Howells <dhowells@redhat.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
"Justin M. Forbes" <jforbes@fedoraproject.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Arnd Bergmann <arnd@arndb.de>, Rosen Penev <rosenp@gmail.com>,
Ard Biesheuvel <ardb@kernel.org>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
keyrings@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: Re: [PATCH] [v2] crypto: lib/Kconfig: hide library options
Date: Mon, 17 Mar 2025 14:38:10 +0200 [thread overview]
Message-ID: <Z9gXsj0D5XmC6G2B@kernel.org> (raw)
In-Reply-To: <20250314160543.605055-1-arnd@kernel.org>
On Fri, Mar 14, 2025 at 05:05:32PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Any driver that needs these library functions should already be selecting
> the corresponding Kconfig symbols, so there is no real point in making
> these visible.
>
> The original patch that made these user selectable described problems
> with drivers failing to select the code they use, but for consistency
> it's better to always use 'select' on a symbol than to mix it with
> 'depends on'.
>
> Fixes: e56e18985596 ("lib/crypto: add prompts back to crypto libraries")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: add the missing 'select' statements
> ---
> drivers/crypto/marvell/Kconfig | 4 ++--
> lib/crypto/Kconfig | 8 ++++----
> security/keys/Kconfig | 2 +-
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig
> index 4c25a78ab3ed..aa269abb0499 100644
> --- a/drivers/crypto/marvell/Kconfig
> +++ b/drivers/crypto/marvell/Kconfig
> @@ -24,7 +24,7 @@ config CRYPTO_DEV_OCTEONTX_CPT
> tristate "Support for Marvell OcteonTX CPT driver"
> depends on ARCH_THUNDER || COMPILE_TEST
> depends on PCI_MSI && 64BIT
> - depends on CRYPTO_LIB_AES
> + select CRYPTO_LIB_AES
> select CRYPTO_SKCIPHER
> select CRYPTO_HASH
> select CRYPTO_AEAD
> @@ -41,10 +41,10 @@ config CRYPTO_DEV_OCTEONTX2_CPT
> tristate "Marvell OcteonTX2 CPT driver"
> depends on ARCH_THUNDER2 || COMPILE_TEST
> depends on PCI_MSI && 64BIT
> - depends on CRYPTO_LIB_AES
> depends on NET_VENDOR_MARVELL
> select OCTEONTX2_MBOX
> select CRYPTO_DEV_MARVELL
> + select CRYPTO_LIB_AES
> select CRYPTO_SKCIPHER
> select CRYPTO_HASH
> select CRYPTO_AEAD
> diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
> index 17322f871586..798972b29b68 100644
> --- a/lib/crypto/Kconfig
> +++ b/lib/crypto/Kconfig
> @@ -63,7 +63,7 @@ config CRYPTO_LIB_CHACHA_INTERNAL
> select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
>
> config CRYPTO_LIB_CHACHA
> - tristate "ChaCha library interface"
> + tristate
> select CRYPTO
> select CRYPTO_LIB_CHACHA_INTERNAL
> help
> @@ -93,7 +93,7 @@ config CRYPTO_LIB_CURVE25519_INTERNAL
> select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
>
> config CRYPTO_LIB_CURVE25519
> - tristate "Curve25519 scalar multiplication library"
> + tristate
> select CRYPTO
> select CRYPTO_LIB_CURVE25519_INTERNAL
> help
> @@ -132,7 +132,7 @@ config CRYPTO_LIB_POLY1305_INTERNAL
> select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
>
> config CRYPTO_LIB_POLY1305
> - tristate "Poly1305 library interface"
> + tristate
> select CRYPTO
> select CRYPTO_LIB_POLY1305_INTERNAL
> help
> @@ -141,7 +141,7 @@ config CRYPTO_LIB_POLY1305
> is available and enabled.
>
> config CRYPTO_LIB_CHACHA20POLY1305
> - tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
> + tristate
> select CRYPTO_LIB_CHACHA
> select CRYPTO_LIB_POLY1305
> select CRYPTO_LIB_UTILS
> diff --git a/security/keys/Kconfig b/security/keys/Kconfig
> index abb03a1b2a5c..d4f5fc1e7263 100644
> --- a/security/keys/Kconfig
> +++ b/security/keys/Kconfig
> @@ -60,7 +60,7 @@ config BIG_KEYS
> bool "Large payload keys"
> depends on KEYS
> depends on TMPFS
> - depends on CRYPTO_LIB_CHACHA20POLY1305 = y
> + select CRYPTO_LIB_CHACHA20POLY1305
> help
> This option provides support for holding large keys within the kernel
> (for example Kerberos ticket caches). The data may be stored out to
> --
> 2.39.5
>
>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
next prev parent reply other threads:[~2025-03-17 12:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 16:05 [PATCH] [v2] crypto: lib/Kconfig: hide library options Arnd Bergmann
2025-03-17 8:36 ` David Howells
2025-03-17 8:37 ` Herbert Xu
2025-03-17 9:04 ` Arnd Bergmann
2025-03-17 12:38 ` Jarkko Sakkinen [this message]
2025-03-21 11:06 ` Herbert Xu
2025-03-30 8:34 ` Geert Uytterhoeven
2025-03-30 8:45 ` Arnd Bergmann
2025-03-30 8:54 ` Geert Uytterhoeven
2025-03-30 9:07 ` Herbert Xu
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=Z9gXsj0D5XmC6G2B@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=arno@natisbad.org \
--cc=bbrezillon@kernel.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=jforbes@fedoraproject.org \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=rosenp@gmail.com \
--cc=schalla@marvell.com \
--cc=serge@hallyn.com \
/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