* [PATCH v2] lib/crypto: add prompts back to crypto libraries @ 2022-01-12 14:01 Justin M. Forbes 2022-01-12 14:04 ` Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Justin M. Forbes @ 2022-01-12 14:01 UTC (permalink / raw) To: Herbert Xu, David S. Miller, Jason A. Donenfeld, Ard Biesheuvel, Greg Kroah-Hartman, linux-crypto, linux-kernel Cc: jmforbes, Justin M. Forbes Commit 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") took away a number of prompt texts from other crypto libraries. This makes values flip from built-in to module when oldconfig runs, and causes problems when these crypto libs need to be built in for thingslike BIG_KEYS. Fixes: 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> --- lib/crypto/Kconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 8620f38e117c..179041b60294 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +menu "Crypto library routines" + config CRYPTO_LIB_AES tristate @@ -40,7 +42,7 @@ config CRYPTO_LIB_CHACHA_GENERIC of CRYPTO_LIB_CHACHA. config CRYPTO_LIB_CHACHA - tristate + tristate "ChaCha library interface" depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n help @@ -65,7 +67,7 @@ config CRYPTO_LIB_CURVE25519_GENERIC of CRYPTO_LIB_CURVE25519. config CRYPTO_LIB_CURVE25519 - tristate + tristate "Curve25519 scalar multiplication library" depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n help @@ -100,7 +102,7 @@ config CRYPTO_LIB_POLY1305_GENERIC of CRYPTO_LIB_POLY1305. config CRYPTO_LIB_POLY1305 - tristate + tristate "Poly1305 library interface" depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n help @@ -109,7 +111,7 @@ config CRYPTO_LIB_POLY1305 is available and enabled. config CRYPTO_LIB_CHACHA20POLY1305 - tristate + 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 select CRYPTO_LIB_CHACHA @@ -120,3 +122,5 @@ config CRYPTO_LIB_SHA256 config CRYPTO_LIB_SM4 tristate + +endmenu -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:01 [PATCH v2] lib/crypto: add prompts back to crypto libraries Justin M. Forbes @ 2022-01-12 14:04 ` Jason A. Donenfeld 2022-01-12 14:06 ` Ard Biesheuvel 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:04 UTC (permalink / raw) To: Justin M. Forbes Cc: Herbert Xu, David S. Miller, Ard Biesheuvel, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes This commit also needs this snippet: diff --git a/crypto/Kconfig b/crypto/Kconfig index 94bfa32cc6a1..442765219c37 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1928,5 +1928,3 @@ source "crypto/asymmetric_keys/Kconfig" source "certs/Kconfig" endif # if CRYPTO - -source "lib/crypto/Kconfig" diff --git a/lib/Kconfig b/lib/Kconfig index 655b0e43f260..c20b68ad2bc3 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -122,6 +122,8 @@ config INDIRECT_IOMEM_FALLBACK mmio accesses when the IO memory address is not a registered emulated region. +source "lib/crypto/Kconfig" + config CRC_CCITT tristate "CRC-CCITT functions" help ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:04 ` Jason A. Donenfeld @ 2022-01-12 14:06 ` Ard Biesheuvel 2022-01-12 14:07 ` Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Ard Biesheuvel @ 2022-01-12 14:06 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > This commit also needs this snippet: > Why? > diff --git a/crypto/Kconfig b/crypto/Kconfig > index 94bfa32cc6a1..442765219c37 100644 > --- a/crypto/Kconfig > +++ b/crypto/Kconfig > @@ -1928,5 +1928,3 @@ source "crypto/asymmetric_keys/Kconfig" > source "certs/Kconfig" > > endif # if CRYPTO > - > -source "lib/crypto/Kconfig" > diff --git a/lib/Kconfig b/lib/Kconfig > index 655b0e43f260..c20b68ad2bc3 100644 > --- a/lib/Kconfig > +++ b/lib/Kconfig > @@ -122,6 +122,8 @@ config INDIRECT_IOMEM_FALLBACK > mmio accesses when the IO memory address is not a registered > emulated region. > > +source "lib/crypto/Kconfig" > + > config CRC_CCITT > tristate "CRC-CCITT functions" > help ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:06 ` Ard Biesheuvel @ 2022-01-12 14:07 ` Jason A. Donenfeld 2022-01-12 14:08 ` Ard Biesheuvel 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:07 UTC (permalink / raw) To: Ard Biesheuvel Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > This commit also needs this snippet: > > > > Why? So that the menu of crypto library options is inside of the library menu. Otherwise this will appear inside of the _root_ menu, which isn't what we want. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:07 ` Jason A. Donenfeld @ 2022-01-12 14:08 ` Ard Biesheuvel 2022-01-12 14:11 ` Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Ard Biesheuvel @ 2022-01-12 14:08 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > This commit also needs this snippet: > > > > > > > Why? > > So that the menu of crypto library options is inside of the library > menu. Otherwise this will appear inside of the _root_ menu, which > isn't what we want. Why not? I think that's fine. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:08 ` Ard Biesheuvel @ 2022-01-12 14:11 ` Jason A. Donenfeld 2022-01-12 14:13 ` Ard Biesheuvel 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:11 UTC (permalink / raw) To: Ard Biesheuvel Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > This commit also needs this snippet: > > > > > > > > > > Why? > > > > So that the menu of crypto library options is inside of the library > > menu. Otherwise this will appear inside of the _root_ menu, which > > isn't what we want. > > Why not? I think that's fine. It's really not appropriate there. Look: - Justin vanilla: https://i.imgur.com/14UBpML.png - Justin + Jason: https://i.imgur.com/lDfZnma.png We really don't want another top level menu. We're not that important. Rather, crypto libraries are but one ordinary subset of ordinary libraries, just like how the build system does it too. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:11 ` Jason A. Donenfeld @ 2022-01-12 14:13 ` Ard Biesheuvel 2022-01-12 14:14 ` Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Ard Biesheuvel @ 2022-01-12 14:13 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > Why? > > > > > > So that the menu of crypto library options is inside of the library > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > isn't what we want. > > > > Why not? I think that's fine. > > It's really not appropriate there. Look: > > - Justin vanilla: https://i.imgur.com/14UBpML.png > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > We really don't want another top level menu. We're not that important. > Rather, crypto libraries are but one ordinary subset of ordinary > libraries, just like how the build system does it too. I disagree. The root menu is a jumble of things already, and having this one at the root is really not a problem. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:13 ` Ard Biesheuvel @ 2022-01-12 14:14 ` Jason A. Donenfeld 2022-01-12 14:19 ` Justin Forbes 2022-01-12 14:41 ` Ard Biesheuvel 0 siblings, 2 replies; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:14 UTC (permalink / raw) To: Ard Biesheuvel Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes, Linux Kbuild mailing list On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > Why? > > > > > > > > So that the menu of crypto library options is inside of the library > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > isn't what we want. > > > > > > Why not? I think that's fine. > > > > It's really not appropriate there. Look: > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > We really don't want another top level menu. We're not that important. > > Rather, crypto libraries are but one ordinary subset of ordinary > > libraries, just like how the build system does it too. > > I disagree. The root menu is a jumble of things already, and having > this one at the root is really not a problem. Should CRC routines also go into a submenu and be put at the root? What about other library functions? Library functions belong in the library submenu. We don't need our own top level submenu for this. The whole point of lib/crypto/ is that they're just boring library functions. Libraries! So, part of the libraries menu. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:14 ` Jason A. Donenfeld @ 2022-01-12 14:19 ` Justin Forbes 2022-01-12 14:20 ` Jason A. Donenfeld 2022-01-12 14:41 ` Ard Biesheuvel 1 sibling, 1 reply; 16+ messages in thread From: Justin Forbes @ 2022-01-12 14:19 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Ard Biesheuvel, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Linux Kbuild mailing list On Wed, Jan 12, 2022 at 8:15 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > > > > Why? > > > > > > > > > > So that the menu of crypto library options is inside of the library > > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > > isn't what we want. > > > > > > > > Why not? I think that's fine. > > > > > > It's really not appropriate there. Look: > > > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > > > We really don't want another top level menu. We're not that important. > > > Rather, crypto libraries are but one ordinary subset of ordinary > > > libraries, just like how the build system does it too. > > > > I disagree. The root menu is a jumble of things already, and having > > this one at the root is really not a problem. > > Should CRC routines also go into a submenu and be put at the root? > What about other library functions? Library functions belong in the > library submenu. We don't need our own top level submenu for this. The > whole point of lib/crypto/ is that they're just boring library > functions. Libraries! So, part of the libraries menu. Specifically in this menu, users were expecting to see it in the Cryptographic API menu. I think having it in the main menu just below this entry is much more appropriate than being buried under another menu. Particularly if the goal is to get rid of the menu again all together once we can audit the full set of deps on crypto libraries. Justin ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:19 ` Justin Forbes @ 2022-01-12 14:20 ` Jason A. Donenfeld 0 siblings, 0 replies; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:20 UTC (permalink / raw) To: Justin Forbes Cc: Ard Biesheuvel, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Linux Kbuild mailing list On Wed, Jan 12, 2022 at 3:19 PM Justin Forbes <jmforbes@linuxtx.org> wrote: > > On Wed, Jan 12, 2022 at 8:15 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > > > > > > > Why? > > > > > > > > > > > > So that the menu of crypto library options is inside of the library > > > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > > > isn't what we want. > > > > > > > > > > Why not? I think that's fine. > > > > > > > > It's really not appropriate there. Look: > > > > > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > > > > > We really don't want another top level menu. We're not that important. > > > > Rather, crypto libraries are but one ordinary subset of ordinary > > > > libraries, just like how the build system does it too. > > > > > > I disagree. The root menu is a jumble of things already, and having > > > this one at the root is really not a problem. > > > > Should CRC routines also go into a submenu and be put at the root? > > What about other library functions? Library functions belong in the > > library submenu. We don't need our own top level submenu for this. The > > whole point of lib/crypto/ is that they're just boring library > > functions. Libraries! So, part of the libraries menu. > > Specifically in this menu, users were expecting to see it in the > Cryptographic API menu. I think having it in the main menu just below > this entry is much more appropriate than being buried under another > menu. Particularly if the goal is to get rid of the menu again all > together once we can audit the full set of deps on crypto libraries. The thing is, even once we get rid of the labels, part of detangling everything is going to involve moving the sourcing of those symbols into lib/Kconfig anyway. No use delaying the inevitable. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:14 ` Jason A. Donenfeld 2022-01-12 14:19 ` Justin Forbes @ 2022-01-12 14:41 ` Ard Biesheuvel 2022-01-12 14:44 ` Jason A. Donenfeld 1 sibling, 1 reply; 16+ messages in thread From: Ard Biesheuvel @ 2022-01-12 14:41 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes, Linux Kbuild mailing list On Wed, 12 Jan 2022 at 15:15, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > > > > Why? > > > > > > > > > > So that the menu of crypto library options is inside of the library > > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > > isn't what we want. > > > > > > > > Why not? I think that's fine. > > > > > > It's really not appropriate there. Look: > > > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > > > We really don't want another top level menu. We're not that important. > > > Rather, crypto libraries are but one ordinary subset of ordinary > > > libraries, just like how the build system does it too. > > > > I disagree. The root menu is a jumble of things already, and having > > this one at the root is really not a problem. > > Should CRC routines also go into a submenu and be put at the root? > What about other library functions? Library functions belong in the > library submenu. We don't need our own top level submenu for this. The > whole point of lib/crypto/ is that they're just boring library > functions. Libraries! So, part of the libraries menu. Shouting it doesn't make it true. Nobody cares about what the root menu looks like, and given that this patch is presumably going to be sent as an early fix on top of your rng branch, it is better not to touch anything under crypto/ unless you are 100% certain it is not going to conflict with Herbert's tree. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:41 ` Ard Biesheuvel @ 2022-01-12 14:44 ` Jason A. Donenfeld 2022-01-12 14:49 ` Ard Biesheuvel 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:44 UTC (permalink / raw) To: Ard Biesheuvel Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes, Linux Kbuild mailing list On Wed, Jan 12, 2022 at 3:42 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > On Wed, 12 Jan 2022 at 15:15, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > > > > > > > Why? > > > > > > > > > > > > So that the menu of crypto library options is inside of the library > > > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > > > isn't what we want. > > > > > > > > > > Why not? I think that's fine. > > > > > > > > It's really not appropriate there. Look: > > > > > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > > > > > We really don't want another top level menu. We're not that important. > > > > Rather, crypto libraries are but one ordinary subset of ordinary > > > > libraries, just like how the build system does it too. > > > > > > I disagree. The root menu is a jumble of things already, and having > > > this one at the root is really not a problem. > > > > Should CRC routines also go into a submenu and be put at the root? > > What about other library functions? Library functions belong in the > > library submenu. We don't need our own top level submenu for this. The > > whole point of lib/crypto/ is that they're just boring library > > functions. Libraries! So, part of the libraries menu. > > Shouting it doesn't make it true. I'm not shouting. I respectfully disagree with your perspective. I think the comparison to CRC routines is an apt one, still unaddressed. > Nobody cares about what the root menu looks like I certainly do. > and given that this > patch is presumably going to be sent as an early fix on top of your > rng branch, it is better not to touch anything under crypto/ unless > you are 100% certain it is not going to conflict with Herbert's tree. Oh, I was thinking Herbert would take this since he hasn't sent a pull yet? Otherwise, sure, I can do it. Jason ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:44 ` Jason A. Donenfeld @ 2022-01-12 14:49 ` Ard Biesheuvel 2022-01-12 14:53 ` Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Ard Biesheuvel @ 2022-01-12 14:49 UTC (permalink / raw) To: Jason A. Donenfeld Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes, Linux Kbuild mailing list On Wed, 12 Jan 2022 at 15:44, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Jan 12, 2022 at 3:42 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > On Wed, 12 Jan 2022 at 15:15, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > On Wed, Jan 12, 2022 at 3:13 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > On Wed, 12 Jan 2022 at 15:12, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > On Wed, Jan 12, 2022 at 3:08 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:08, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > On Wed, Jan 12, 2022 at 3:06 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > > > > > > > > > > > > > > > On Wed, 12 Jan 2022 at 15:05, Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > > > > > > > > > > > > > > > This commit also needs this snippet: > > > > > > > > > > > > > > > > > > > > > > > > > Why? > > > > > > > > > > > > > > So that the menu of crypto library options is inside of the library > > > > > > > menu. Otherwise this will appear inside of the _root_ menu, which > > > > > > > isn't what we want. > > > > > > > > > > > > Why not? I think that's fine. > > > > > > > > > > It's really not appropriate there. Look: > > > > > > > > > > - Justin vanilla: https://i.imgur.com/14UBpML.png > > > > > - Justin + Jason: https://i.imgur.com/lDfZnma.png > > > > > > > > > > We really don't want another top level menu. We're not that important. > > > > > Rather, crypto libraries are but one ordinary subset of ordinary > > > > > libraries, just like how the build system does it too. > > > > > > > > I disagree. The root menu is a jumble of things already, and having > > > > this one at the root is really not a problem. > > > > > > Should CRC routines also go into a submenu and be put at the root? > > > What about other library functions? Library functions belong in the > > > library submenu. We don't need our own top level submenu for this. The > > > whole point of lib/crypto/ is that they're just boring library > > > functions. Libraries! So, part of the libraries menu. > > > > Shouting it doesn't make it true. > > I'm not shouting. I respectfully disagree with your perspective. I > think the comparison to CRC routines is an apt one, still unaddressed. > Sure, but none of this is relevant for the short term fix that we need to get in asap. There are lots of future changes we can philosophize about, but those discussions should take place on the linux-crypto list after the merge window closes. > > Nobody cares about what the root menu looks like > > I certainly do. > Fair enough. But on many architectures, it looks absolutely horrid, and I rarely see fixes sent for it. > > and given that this > > patch is presumably going to be sent as an early fix on top of your > > rng branch, it is better not to touch anything under crypto/ unless > > you are 100% certain it is not going to conflict with Herbert's tree. > > Oh, I was thinking Herbert would take this since he hasn't sent a pull > yet? Otherwise, sure, I can do it. > How could he? This patch does not apply to his cryptodev tree, which won't receive backmerges from mainline until the next cycle. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:49 ` Ard Biesheuvel @ 2022-01-12 14:53 ` Jason A. Donenfeld 2022-01-12 14:57 ` [PATCH v3] " Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:53 UTC (permalink / raw) To: Ard Biesheuvel Cc: Justin M. Forbes, Herbert Xu, David S. Miller, Greg Kroah-Hartman, Linux Crypto Mailing List, LKML, Justin Forbes, Linux Kbuild mailing list On Wed, Jan 12, 2022 at 3:50 PM Ard Biesheuvel <ardb@kernel.org> wrote: > > Sure, but none of this is relevant for the short term fix that we need > to get in asap. There are lots of future changes we can philosophize > about, but those discussions should take place on the linux-crypto > list after the merge window closes. I think of adding things to the root menu as a regression. I'd like to avoid an additional regression in fixing this. > > > and given that this > > > patch is presumably going to be sent as an early fix on top of your > > > rng branch, it is better not to touch anything under crypto/ unless > > > you are 100% certain it is not going to conflict with Herbert's tree. > > > > Oh, I was thinking Herbert would take this since he hasn't sent a pull > > yet? Otherwise, sure, I can do it. > > > > How could he? This patch does not apply to his cryptodev tree, which > won't receive backmerges from mainline until the next cycle. Oh, okay then. I'll take it. In which case, I really don't want to be the one responsible for mucking up the root menu with something nobody cares about (crypto library submenu). I'll fix up the menu location thing locally then and send a v3 here. Jason ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:53 ` Jason A. Donenfeld @ 2022-01-12 14:57 ` Jason A. Donenfeld 2022-01-16 16:58 ` [PATCH v4] " Jason A. Donenfeld 0 siblings, 1 reply; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-12 14:57 UTC (permalink / raw) To: Herbert Xu, David S. Miller, Jason A. Donenfeld, Ard Biesheuvel, Greg Kroah-Hartman, linux-crypto, linux-kernel Cc: Justin M. Forbes From: "Justin M. Forbes" <jforbes@fedoraproject.org> Commit 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") took away a number of prompt texts from other crypto libraries. This makes values flip from built-in to module when oldconfig runs, and causes problems when these crypto libs need to be built in for thingslike BIG_KEYS. Fixes: 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> [Jason: moved menu into submenu of lib/ instead of root menu] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- crypto/Kconfig | 2 -- lib/Kconfig | 2 ++ lib/crypto/Kconfig | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index 55718de56137..a346b6f74bb3 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1924,5 +1924,3 @@ source "crypto/asymmetric_keys/Kconfig" source "certs/Kconfig" endif # if CRYPTO - -source "lib/crypto/Kconfig" diff --git a/lib/Kconfig b/lib/Kconfig index 5e7165e6a346..9534698ce890 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -122,6 +122,8 @@ config INDIRECT_IOMEM_FALLBACK mmio accesses when the IO memory address is not a registered emulated region. +source "lib/crypto/Kconfig" + config CRC_CCITT tristate "CRC-CCITT functions" help diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 8620f38e117c..179041b60294 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +menu "Crypto library routines" + config CRYPTO_LIB_AES tristate @@ -40,7 +42,7 @@ config CRYPTO_LIB_CHACHA_GENERIC of CRYPTO_LIB_CHACHA. config CRYPTO_LIB_CHACHA - tristate + tristate "ChaCha library interface" depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n help @@ -65,7 +67,7 @@ config CRYPTO_LIB_CURVE25519_GENERIC of CRYPTO_LIB_CURVE25519. config CRYPTO_LIB_CURVE25519 - tristate + tristate "Curve25519 scalar multiplication library" depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n help @@ -100,7 +102,7 @@ config CRYPTO_LIB_POLY1305_GENERIC of CRYPTO_LIB_POLY1305. config CRYPTO_LIB_POLY1305 - tristate + tristate "Poly1305 library interface" depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n help @@ -109,7 +111,7 @@ config CRYPTO_LIB_POLY1305 is available and enabled. config CRYPTO_LIB_CHACHA20POLY1305 - tristate + 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 select CRYPTO_LIB_CHACHA @@ -120,3 +122,5 @@ config CRYPTO_LIB_SHA256 config CRYPTO_LIB_SM4 tristate + +endmenu -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v4] lib/crypto: add prompts back to crypto libraries 2022-01-12 14:57 ` [PATCH v3] " Jason A. Donenfeld @ 2022-01-16 16:58 ` Jason A. Donenfeld 0 siblings, 0 replies; 16+ messages in thread From: Jason A. Donenfeld @ 2022-01-16 16:58 UTC (permalink / raw) To: Herbert Xu, David S. Miller, Jason A. Donenfeld, Ard Biesheuvel, Greg Kroah-Hartman, linux-crypto, linux-kernel, Justin M. Forbes From: "Justin M. Forbes" <jforbes@fedoraproject.org> Commit 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") took away a number of prompt texts from other crypto libraries. This makes values flip from built-in to module when oldconfig runs, and causes problems when these crypto libs need to be built in for thingslike BIG_KEYS. Fixes: 6048fdcc5f269 ("lib/crypto: blake2s: include as built-in") Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: linux-crypto@vger.kernel.org Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> [Jason: - moved menu into submenu of lib/ instead of root menu - fixed chacha sub-dependencies for CONFIG_CRYPTO] Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> --- crypto/Kconfig | 2 -- lib/Kconfig | 2 ++ lib/crypto/Kconfig | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index 55718de56137..a346b6f74bb3 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1924,5 +1924,3 @@ source "crypto/asymmetric_keys/Kconfig" source "certs/Kconfig" endif # if CRYPTO - -source "lib/crypto/Kconfig" diff --git a/lib/Kconfig b/lib/Kconfig index 5e7165e6a346..9534698ce890 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -122,6 +122,8 @@ config INDIRECT_IOMEM_FALLBACK mmio accesses when the IO memory address is not a registered emulated region. +source "lib/crypto/Kconfig" + config CRC_CCITT tristate "CRC-CCITT functions" help diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 8620f38e117c..e8e525650cf2 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 +menu "Crypto library routines" + config CRYPTO_LIB_AES tristate @@ -31,7 +33,7 @@ config CRYPTO_ARCH_HAVE_LIB_CHACHA config CRYPTO_LIB_CHACHA_GENERIC tristate - select CRYPTO_ALGAPI + select XOR_BLOCKS help This symbol can be depended upon by arch implementations of the ChaCha library interface that require the generic code as a @@ -40,7 +42,8 @@ config CRYPTO_LIB_CHACHA_GENERIC of CRYPTO_LIB_CHACHA. config CRYPTO_LIB_CHACHA - tristate + tristate "ChaCha library interface" + depends on CRYPTO depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n help @@ -65,7 +68,7 @@ config CRYPTO_LIB_CURVE25519_GENERIC of CRYPTO_LIB_CURVE25519. config CRYPTO_LIB_CURVE25519 - tristate + tristate "Curve25519 scalar multiplication library" depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519 select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n help @@ -100,7 +103,7 @@ config CRYPTO_LIB_POLY1305_GENERIC of CRYPTO_LIB_POLY1305. config CRYPTO_LIB_POLY1305 - tristate + tristate "Poly1305 library interface" depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305 select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n help @@ -109,14 +112,18 @@ config CRYPTO_LIB_POLY1305 is available and enabled. config CRYPTO_LIB_CHACHA20POLY1305 - tristate + 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 + select CRYPTO_ALGAPI config CRYPTO_LIB_SHA256 tristate config CRYPTO_LIB_SM4 tristate + +endmenu -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-01-16 16:58 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-01-12 14:01 [PATCH v2] lib/crypto: add prompts back to crypto libraries Justin M. Forbes 2022-01-12 14:04 ` Jason A. Donenfeld 2022-01-12 14:06 ` Ard Biesheuvel 2022-01-12 14:07 ` Jason A. Donenfeld 2022-01-12 14:08 ` Ard Biesheuvel 2022-01-12 14:11 ` Jason A. Donenfeld 2022-01-12 14:13 ` Ard Biesheuvel 2022-01-12 14:14 ` Jason A. Donenfeld 2022-01-12 14:19 ` Justin Forbes 2022-01-12 14:20 ` Jason A. Donenfeld 2022-01-12 14:41 ` Ard Biesheuvel 2022-01-12 14:44 ` Jason A. Donenfeld 2022-01-12 14:49 ` Ard Biesheuvel 2022-01-12 14:53 ` Jason A. Donenfeld 2022-01-12 14:57 ` [PATCH v3] " Jason A. Donenfeld 2022-01-16 16:58 ` [PATCH v4] " Jason A. Donenfeld
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.