mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 00:51:51 -04:00
crypto: cryptomgr - Select algorithm types only when CRYPTO_SELFTESTS
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -153,19 +153,20 @@ config CRYPTO_MANAGER
|
||||
|
||||
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
|
||||
select CRYPTO_RNG
|
||||
help
|
||||
Userspace configuration for cryptographic instantiations such as
|
||||
cbc(aes).
|
||||
@@ -220,6 +221,7 @@ config CRYPTO_PCRYPT
|
||||
|
||||
config CRYPTO_CRYPTD
|
||||
tristate "Software async crypto daemon"
|
||||
select CRYPTO_AEAD
|
||||
select CRYPTO_SKCIPHER
|
||||
select CRYPTO_HASH
|
||||
select CRYPTO_MANAGER
|
||||
@@ -253,7 +255,10 @@ config CRYPTO_KRB5ENC
|
||||
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.
|
||||
|
||||
@@ -263,10 +268,16 @@ config CRYPTO_BENCHMARK
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -301,6 +301,7 @@ config CRYPTO_DEV_PPC4XX
|
||||
select CRYPTO_CCM
|
||||
select CRYPTO_CTR
|
||||
select CRYPTO_GCM
|
||||
select CRYPTO_RNG
|
||||
select CRYPTO_SKCIPHER
|
||||
help
|
||||
This option allows you to have support for AMCC crypto acceleration.
|
||||
|
||||
@@ -14,6 +14,7 @@ config CRYPTO_DEV_SUN4I_SS
|
||||
select CRYPTO_SHA1
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_LIB_DES
|
||||
select CRYPTO_RNG
|
||||
select CRYPTO_SKCIPHER
|
||||
help
|
||||
Some Allwinner SoC have a crypto accelerator named
|
||||
@@ -49,6 +50,7 @@ config CRYPTO_DEV_SUN8I_CE
|
||||
select CRYPTO_CBC
|
||||
select CRYPTO_AES
|
||||
select CRYPTO_DES
|
||||
select CRYPTO_RNG
|
||||
depends on CRYPTO_DEV_ALLWINNER
|
||||
depends on PM
|
||||
help
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config CRYPTO_DEV_QAT
|
||||
tristate
|
||||
select CRYPTO_ACOMP
|
||||
select CRYPTO_AEAD
|
||||
select CRYPTO_AUTHENC
|
||||
select CRYPTO_SKCIPHER
|
||||
|
||||
Reference in New Issue
Block a user