public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
@ 2026-03-24  5:01 Eric Biggers
  2026-03-24 19:53 ` kernel test robot
  2026-03-25  5:48 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2026-03-24  5:01 UTC (permalink / raw)
  To: Herbert Xu, linux-crypto; +Cc: linux-kernel, Eric Biggers

Enabling any template selects CRYPTO_MANAGER, which causes
CRYPTO_MANAGER2 to enable itself, which selects every algorithm type
option.  However, pulling in all algorithm types is needed only when the
self-tests are enabled.  So condition the selections accordingly.

To make this possible, also add the missing selections to various
symbols that were relying on transitive selections via CRYPTO_MANAGER.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---

This patch is targeting cryptodev/master

v2: add selections to options that were relying on transitive selection

 crypto/Kconfig | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index e2b4106ac961..209a040c74bf 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -155,18 +155,18 @@ config CRYPTO_MANAGER
 	  This provides the support for instantiating templates such as
 	  cbc(aes), and the support for the crypto self-tests.
 
 config CRYPTO_MANAGER2
 	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
-	select CRYPTO_ACOMP2
-	select CRYPTO_AEAD2
-	select CRYPTO_AKCIPHER2
-	select CRYPTO_SIG2
-	select CRYPTO_HASH2
-	select CRYPTO_KPP2
-	select CRYPTO_RNG2
-	select CRYPTO_SKCIPHER2
+	select CRYPTO_ACOMP2 if CRYPTO_SELFTESTS
+	select CRYPTO_AEAD2 if CRYPTO_SELFTESTS
+	select CRYPTO_AKCIPHER2 if CRYPTO_SELFTESTS
+	select CRYPTO_SIG2 if CRYPTO_SELFTESTS
+	select CRYPTO_HASH2 if CRYPTO_SELFTESTS
+	select CRYPTO_KPP2 if CRYPTO_SELFTESTS
+	select CRYPTO_RNG2 if CRYPTO_SELFTESTS
+	select CRYPTO_SKCIPHER2 if CRYPTO_SELFTESTS
 
 config CRYPTO_USER
 	tristate "Userspace cryptographic algorithm configuration"
 	depends on NET
 	select CRYPTO_MANAGER
@@ -222,10 +222,11 @@ config CRYPTO_PCRYPT
 	  This converts an arbitrary crypto algorithm into a parallel
 	  algorithm that executes in kernel threads.
 
 config CRYPTO_CRYPTD
 	tristate "Software async crypto daemon"
+	select CRYPTO_AEAD
 	select CRYPTO_SKCIPHER
 	select CRYPTO_HASH
 	select CRYPTO_MANAGER
 	help
 	  This is a generic software asynchronous crypto daemon that
@@ -255,24 +256,33 @@ config CRYPTO_KRB5ENC
 	  sunrpc/NFS and rxrpc/AFS.
 
 config CRYPTO_BENCHMARK
 	tristate "Crypto benchmarking module"
 	depends on m || EXPERT
+	select CRYPTO_AEAD
+	select CRYPTO_HASH
 	select CRYPTO_MANAGER
+	select CRYPTO_SKCIPHER
 	help
 	  Quick & dirty crypto benchmarking module.
 
 	  This is mainly intended for use by people developing cryptographic
 	  algorithms in the kernel.  It should not be enabled in production
 	  kernels.
 
 config CRYPTO_SIMD
 	tristate
+	select CRYPTO_AEAD
 	select CRYPTO_CRYPTD
 
 config CRYPTO_ENGINE
 	tristate
+	select CRYPTO_AEAD
+	select CRYPTO_AKCIPHER
+	select CRYPTO_HASH
+	select CRYPTO_KPP
+	select CRYPTO_SKCIPHER
 
 endmenu
 
 menu "Public-key cryptography"
 
base-commit: f9bbd547cfb98b1c5e535aab9b0671a2ff22453a
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
  2026-03-24  5:01 [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS Eric Biggers
@ 2026-03-24 19:53 ` kernel test robot
  2026-03-25  5:48 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-24 19:53 UTC (permalink / raw)
  To: Eric Biggers, Herbert Xu, linux-crypto
  Cc: oe-kbuild-all, linux-kernel, Eric Biggers

Hi Eric,

kernel test robot noticed the following build errors:

[auto build test ERROR on f9bbd547cfb98b1c5e535aab9b0671a2ff22453a]

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Biggers/crypto-cryptomgr-Select-algorithm-types-only-when-CRYPTO_SELFTESTS/20260324-131705
base:   f9bbd547cfb98b1c5e535aab9b0671a2ff22453a
patch link:    https://lore.kernel.org/r/20260324050123.9494-1-ebiggers%40kernel.org
patch subject: [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
config: sparc-randconfig-002-20260325 (https://download.01.org/0day-ci/archive/20260325/202603250302.MimbBMTL-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603250302.MimbBMTL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603250302.MimbBMTL-lkp@intel.com/

All errors (new ones prefixed by >>):

   sparc-linux-ld: drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.o: in function `sun8i_ce_unregister_algs':
>> sun8i-ce-core.c:(.text+0x19c): undefined reference to `crypto_unregister_rng'
   sparc-linux-ld: drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.o: in function `sun8i_ce_register_algs':
>> sun8i-ce-core.c:(.text+0x654): undefined reference to `crypto_register_rng'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
  2026-03-24  5:01 [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS Eric Biggers
  2026-03-24 19:53 ` kernel test robot
@ 2026-03-25  5:48 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-25  5:48 UTC (permalink / raw)
  To: Eric Biggers, Herbert Xu, linux-crypto
  Cc: oe-kbuild-all, linux-kernel, Eric Biggers

Hi Eric,

kernel test robot noticed the following build errors:

[auto build test ERROR on f9bbd547cfb98b1c5e535aab9b0671a2ff22453a]

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Biggers/crypto-cryptomgr-Select-algorithm-types-only-when-CRYPTO_SELFTESTS/20260324-131705
base:   f9bbd547cfb98b1c5e535aab9b0671a2ff22453a
patch link:    https://lore.kernel.org/r/20260324050123.9494-1-ebiggers%40kernel.org
patch subject: [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
config: i386-randconfig-053-20260325 (https://download.01.org/0day-ci/archive/20260325/202603251327.8QCIZ1bS-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260325/202603251327.8QCIZ1bS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603251327.8QCIZ1bS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: crypto_register_acomps
   >>> referenced by qat_comp_algs.c:258 (drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:258)
   >>>               drivers/crypto/intel/qat/qat_common/qat_comp_algs.o:(qat_comp_algs_register) in archive vmlinux.a
--
>> ld.lld: error: undefined symbol: crypto_unregister_acomps
   >>> referenced by qat_comp_algs.c:267 (drivers/crypto/intel/qat/qat_common/qat_comp_algs.c:267)
   >>>               drivers/crypto/intel/qat/qat_common/qat_comp_algs.o:(qat_comp_algs_unregister) in archive vmlinux.a

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-25  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24  5:01 [PATCH v2] crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS Eric Biggers
2026-03-24 19:53 ` kernel test robot
2026-03-25  5:48 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox