diff options
author | Herbert Xu <[email protected]> | 2016-12-29 17:44:15 +0800 |
---|---|---|
committer | Herbert Xu <[email protected]> | 2016-12-30 18:20:45 +0800 |
commit | 07825f0acd85dd8b7481d5ef0eb024b05364d892 (patch) | |
tree | bec3cdf91dfaf22d9b76c316d816545877eccccf | |
parent | 02608e02fbec04fccf2eb0cc8d8082f65c0a4286 (diff) |
crypto: aesni - Fix failure when built-in with modular pcbc
If aesni is built-in but pcbc is built as a module, then aesni
will fail completely because when it tries to register the pcbc
variant of aes the pcbc template is not available.
This patch fixes this by modifying the pcbc presence test so that
if aesni is built-in then pcbc must also be built-in for it to be
used by aesni.
Fixes: 85671860caac ("crypto: aesni - Convert to skcipher")
Reported-by: Stephan Müller <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 31c34ee131f3..6ef688a1ef3e 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c @@ -1020,7 +1020,8 @@ struct { const char *basename; struct simd_skcipher_alg *simd; } aesni_simd_skciphers2[] = { -#if IS_ENABLED(CONFIG_CRYPTO_PCBC) +#if (defined(MODULE) && IS_ENABLED(CONFIG_CRYPTO_PCBC)) || \ + IS_BUILTIN(CONFIG_CRYPTO_PCBC) { .algname = "pcbc(aes)", .drvname = "pcbc-aes-aesni", |