@@ -65,6 +65,7 @@ config CRYPTO_AES_ARM
tristate "Scalar AES cipher for ARM"
select CRYPTO_ALGAPI
select CRYPTO_AES_CORE
+ select CRYPTO_HAVE_AES
help
Use optimized AES assembler routines for ARM platforms.
@@ -44,6 +44,7 @@ config CRYPTO_CRC32_ARM64_CE
config CRYPTO_AES_ARM64
tristate "AES core cipher using scalar instructions"
select CRYPTO_AES_CORE
+ select CRYPTO_HAVE_AES
config CRYPTO_AES_ARM64_CE
tristate "AES core cipher using ARMv8 Crypto Extensions"
@@ -896,7 +896,11 @@ comment "Ciphers"
config CRYPTO_NEED_AES
tristate
- select CRYPTO_AES
+ select CRYPTO_AES if (CRYPTO_NEED_AES=y && CRYPTO_HAVE_AES != y) || \
+ (CRYPTO_NEED_AES=m && !CRYPTO_HAVE_AES)
+
+config CRYPTO_HAVE_AES
+ tristate
config CRYPTO_AES
tristate "AES cipher algorithms"
@@ -927,6 +931,7 @@ config CRYPTO_AES_CORE
config CRYPTO_AES_TI
tristate "Fixed time AES cipher"
select CRYPTO_ALGAPI
+ select CRYPTO_HAVE_AES
help
This is a generic implementation of AES that attempts to eliminate
data dependent latencies as much as possible without affecting
@@ -946,6 +951,7 @@ config CRYPTO_AES_586
depends on (X86 || UML_X86) && !64BIT
select CRYPTO_ALGAPI
select CRYPTO_AES_CORE
+ select CRYPTO_HAVE_AES
help
AES cipher algorithms (FIPS-197). AES uses the Rijndael
algorithm.
@@ -968,6 +974,7 @@ config CRYPTO_AES_X86_64
depends on (X86 || UML_X86) && 64BIT
select CRYPTO_ALGAPI
select CRYPTO_AES_CORE
+ select CRYPTO_HAVE_AES
help
AES cipher algorithms (FIPS-197). AES uses the Rijndael
algorithm.
Allow other AES drivers than crypto/aes_generic.o to fulfil soft dependencies on AES. This allows CRYPTO_AES to be disabled if no hard dependencies on it are enabled. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/crypto/Kconfig | 1 + arch/arm64/crypto/Kconfig | 1 + crypto/Kconfig | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) -- 2.7.4