Skip to content

Commit 7fa885e

Browse files
Ard Biesheuvelherbertx
authored andcommitted
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: e99ce92 ("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>
1 parent f1bf9e6 commit 7fa885e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/arm64/crypto/sm4-ce-glue.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ static void __exit sm4_ce_mod_fini(void)
6969
crypto_unregister_alg(&sm4_ce_alg);
7070
}
7171

72-
module_cpu_feature_match(SM3, sm4_ce_mod_init);
72+
module_cpu_feature_match(SM4, sm4_ce_mod_init);
7373
module_exit(sm4_ce_mod_fini);

0 commit comments

Comments
 (0)