Skip to content

Commit 39e0bdd

Browse files
ardbiesheuvelgregkh
authored andcommitted
crypto: arm64/aes-ce - really hide slower algos when faster ones are enabled
[ Upstream commit 15deb43 ] Commit 69b6f2e ("crypto: arm64/aes-neon - limit exposed routines if faster driver is enabled") intended to hide modes from the plain NEON driver that are also implemented by the faster bit sliced NEON one if both are enabled. However, the defined() CPP function does not detect if the bit sliced NEON driver is enabled as a module. So instead, let's use IS_ENABLED() here. Fixes: 69b6f2e ("crypto: arm64/aes-neon - limit exposed routines if ...") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2f7287f commit 39e0bdd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/arm64/crypto/aes-glue.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions");
5555
#define aes_mac_update neon_aes_mac_update
5656
MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON");
5757
#endif
58-
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS)
58+
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS)
5959
MODULE_ALIAS_CRYPTO("ecb(aes)");
6060
MODULE_ALIAS_CRYPTO("cbc(aes)");
6161
MODULE_ALIAS_CRYPTO("ctr(aes)");
@@ -650,7 +650,7 @@ static int __maybe_unused xts_decrypt(struct skcipher_request *req)
650650
}
651651

652652
static struct skcipher_alg aes_algs[] = { {
653-
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !defined(CONFIG_CRYPTO_AES_ARM64_BS)
653+
#if defined(USE_V8_CRYPTO_EXTENSIONS) || !IS_ENABLED(CONFIG_CRYPTO_AES_ARM64_BS)
654654
.base = {
655655
.cra_name = "__ecb(aes)",
656656
.cra_driver_name = "__ecb-aes-" MODE,

0 commit comments

Comments
 (0)