@@ -894,6 +894,10 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
comment "Ciphers"
+config CRYPTO_NEED_AES
+ tristate
+ select CRYPTO_AES
+
config CRYPTO_AES
tristate "AES cipher algorithms"
select CRYPTO_ALGAPI
@@ -1666,7 +1670,7 @@ comment "Random Number Generation"
config CRYPTO_ANSI_CPRNG
tristate "Pseudo Random Number Generation for Cryptographic modules"
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_RNG
help
This option enables the generic pseudo random number generator
@@ -1696,7 +1700,7 @@ config CRYPTO_DRBG_HASH
config CRYPTO_DRBG_CTR
bool "Enable CTR DRBG"
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
depends on CRYPTO_CTR
help
Enable the CTR DRBG variant as defined in NIST SP800-90A.
@@ -531,7 +531,7 @@ config BLK_DEV_RBD
depends on INET && BLOCK
select CEPH_LIB
select LIBCRC32C
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO
default n
help
@@ -329,7 +329,7 @@ config CRYPTO_DEV_OMAP_SHAM
config CRYPTO_DEV_OMAP_AES
tristate "Support for OMAP AES hw engine"
depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP2PLUS
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_BLKCIPHER
select CRYPTO_ENGINE
select CRYPTO_CBC
@@ -355,7 +355,7 @@ config CRYPTO_DEV_PICOXCELL
tristate "Support for picoXcell IPSEC and Layer2 crypto engines"
depends on (ARCH_PICOXCELL || COMPILE_TEST) && HAVE_CLK
select CRYPTO_AEAD
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_AUTHENC
select CRYPTO_BLKCIPHER
select CRYPTO_DES
@@ -373,7 +373,7 @@ config CRYPTO_DEV_SAHARA
tristate "Support for SAHARA crypto accelerator"
depends on ARCH_MXC && OF
select CRYPTO_BLKCIPHER
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_ECB
help
This option enables support for the SAHARA HW crypto accelerator
@@ -500,7 +500,7 @@ config CRYPTO_DEV_MXS_DCP
select STMP_DEVICE
select CRYPTO_CBC
select CRYPTO_ECB
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_BLKCIPHER
select CRYPTO_HASH
help
@@ -523,7 +523,7 @@ config CRYPTO_DEV_CAVIUM_ZIP
config CRYPTO_DEV_QCE
tristate "Qualcomm crypto engine accelerator"
depends on (ARCH_QCOM || COMPILE_TEST) && HAS_DMA && HAS_IOMEM
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_DES
select CRYPTO_ECB
select CRYPTO_CBC
@@ -230,7 +230,7 @@ config GTP
config MACSEC
tristate "IEEE 802.1AE MAC-level encryption (MACsec)"
select CRYPTO
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_GCM
select GRO_CELLS
---help---
@@ -38,7 +38,7 @@ config AIRO_CS
select WEXT_SPY
select WEXT_PRIV
select CRYPTO
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
---help---
This is the standard Linux driver to support Cisco/Aironet PCMCIA
802.11 wireless cards. This driver is the same as the Aironet
@@ -161,7 +161,7 @@ config LIBIPW
select CRYPTO
select CRYPTO_ARC4
select CRYPTO_ECB
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_MICHAEL_MIC
select CRYPTO_ECB
select CRC32
@@ -6,7 +6,7 @@ config HOSTAP
select CRYPTO
select CRYPTO_ARC4
select CRYPTO_ECB
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_MICHAEL_MIC
select CRYPTO_ECB
select CRC32
@@ -14,7 +14,7 @@ if RTLLIB
config RTLLIB_CRYPTO_CCMP
tristate "Support for rtllib CCMP crypto"
depends on RTLLIB
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
default y
---help---
CCMP crypto driver for rtllib.
@@ -8,7 +8,7 @@ config USB_WUSB
select CRYPTO_BLKCIPHER
select CRYPTO_CBC
select CRYPTO_MANAGER
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
help
Enable the host-side support for Wireless USB.
@@ -3,7 +3,7 @@ config CEPH_FS
depends on INET
select CEPH_LIB
select LIBCRC32C
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO
default n
help
@@ -171,7 +171,7 @@ config CIFS_SMB2
select KEYS
select FSCACHE
select DNS_RESOLVER
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_SHA256
select CRYPTO_CMAC
select CRYPTO_AEAD2
@@ -1,7 +1,7 @@
config FS_ENCRYPTION
tristate "FS Encryption (Per-file encryption)"
select CRYPTO
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_CBC
select CRYPTO_ECB
select CRYPTO_XTS
@@ -62,7 +62,7 @@ source "net/smc/Kconfig"
config INET
bool "TCP/IP networking"
select CRYPTO
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
---help---
These are the protocols used on the Internet and on most local
Ethernets. It is highly recommended to say Y here (this will enlarge
@@ -9,7 +9,7 @@ menuconfig BT
select CRC16
select CRYPTO
select CRYPTO_BLKCIPHER
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_CMAC
select CRYPTO_ECB
select CRYPTO_SHA256
@@ -2,7 +2,7 @@ config CEPH_LIB
tristate "Ceph core library"
depends on INET
select LIBCRC32C
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_CBC
select CRYPTO
select KEYS
@@ -3,7 +3,7 @@ config MAC80211
depends on CFG80211
select CRYPTO
select CRYPTO_ARC4
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_CCM
select CRYPTO_GCM
select CRYPTO_CMAC
@@ -6,7 +6,7 @@ config MAC802154
select CRYPTO_AUTHENC
select CRYPTO_CCM
select CRYPTO_CTR
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
---help---
This option enables the hardware independent IEEE 802.15.4
networking stack for SoftMAC devices (the ones implementing
@@ -19,7 +19,8 @@ config RPCSEC_GSS_KRB5
tristate "Secure RPC: Kerberos V mechanism"
depends on SUNRPC && CRYPTO
depends on CRYPTO_MD5 && CRYPTO_DES && CRYPTO_CBC && CRYPTO_CTS
- depends on CRYPTO_ECB && CRYPTO_HMAC && CRYPTO_SHA1 && CRYPTO_AES
+ depends on CRYPTO_ECB && CRYPTO_HMAC && CRYPTO_SHA1
+ select CRYPTO_NEED_AES
depends on CRYPTO_ARC4
default y
select SUNRPC_GSS
@@ -42,7 +42,7 @@ config BIG_KEYS
depends on KEYS
depends on TMPFS
depends on (CRYPTO_ANSI_CPRNG = y || CRYPTO_DRBG = y)
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_ECB
select CRYPTO_RNG
help
@@ -73,7 +73,7 @@ config ENCRYPTED_KEYS
depends on KEYS
select CRYPTO
select CRYPTO_HMAC
- select CRYPTO_AES
+ select CRYPTO_NEED_AES
select CRYPTO_CBC
select CRYPTO_SHA256
select CRYPTO_RNG
Many drivers have a soft dependency on the availability of any crypto driver that implements the "aes" cipher. To separate this notion from the link time dependency on the tables or routines in the generic AES driver, introduce a new Kconfig symbol CRYPTO_NEED_AES and use it to replace any occurrences of CRYPTO_AES pertaining to such soft dependencies. For now, CRYPTO_NEED_AES simply implies CONFIG_AES, so the net result is still the same. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- crypto/Kconfig | 8 ++++++-- drivers/block/Kconfig | 2 +- drivers/crypto/Kconfig | 10 +++++----- drivers/net/Kconfig | 2 +- drivers/net/wireless/cisco/Kconfig | 2 +- drivers/net/wireless/intel/ipw2x00/Kconfig | 2 +- drivers/net/wireless/intersil/hostap/Kconfig | 2 +- drivers/staging/rtl8192e/Kconfig | 2 +- drivers/usb/wusbcore/Kconfig | 2 +- fs/ceph/Kconfig | 2 +- fs/cifs/Kconfig | 2 +- fs/crypto/Kconfig | 2 +- net/Kconfig | 2 +- net/bluetooth/Kconfig | 2 +- net/ceph/Kconfig | 2 +- net/mac80211/Kconfig | 2 +- net/mac802154/Kconfig | 2 +- net/sunrpc/Kconfig | 3 ++- security/keys/Kconfig | 4 ++-- 19 files changed, 30 insertions(+), 25 deletions(-) -- 2.7.4