summaryrefslogtreecommitdiffstats
path: root/arch/arm64/crypto
diff options
context:
space:
mode:
authorArd Biesheuvel2018-08-07 23:18:36 +0200
committerHerbert Xu2018-08-25 13:50:41 +0200
commit7fa885e2a22fd0f91a2c23d9275f5021f618ff5a (patch)
tree7412ec65ec89317b8b2180cabe4f056d440eacab /arch/arm64/crypto
parentcrypto: caam - fix DMA mapping direction for RSA forms 2 & 3 (diff)
downloadkernel-qcow2-linux-7fa885e2a22fd0f91a2c23d9275f5021f618ff5a.tar.gz
kernel-qcow2-linux-7fa885e2a22fd0f91a2c23d9275f5021f618ff5a.tar.xz
kernel-qcow2-linux-7fa885e2a22fd0f91a2c23d9275f5021f618ff5a.zip
crypto: arm64/sm4-ce - check for the right CPU feature bit
ARMv8.2 specifies special instructions for the SM3 cryptographic hash and the SM4 symmetric cipher. While it is unlikely that a core would implement one and not the other, we should only use SM4 instructions if the SM4 CPU feature bit is set, and we currently check the SM3 feature bit instead. So fix that. Fixes: e99ce921c468 ("crypto: arm64 - add support for SM4...") Cc: <stable@vger.kernel.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto')
-rw-r--r--arch/arm64/crypto/sm4-ce-glue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/crypto/sm4-ce-glue.c b/arch/arm64/crypto/sm4-ce-glue.c
index b7fb5274b250..0c4fc223f225 100644
--- a/arch/arm64/crypto/sm4-ce-glue.c
+++ b/arch/arm64/crypto/sm4-ce-glue.c
@@ -69,5 +69,5 @@ static void __exit sm4_ce_mod_fini(void)
crypto_unregister_alg(&sm4_ce_alg);
}
-module_cpu_feature_match(SM3, sm4_ce_mod_init);
+module_cpu_feature_match(SM4, sm4_ce_mod_init);
module_exit(sm4_ce_mod_fini);