]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/sm4-ce - check for the right CPU feature bit
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 7 Aug 2018 21:18:36 +0000 (23:18 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 25 Aug 2018 11:50:41 +0000 (19:50 +0800)
commit8c5b704a9271b44bfcea8b31eb1adc47063922bf
tree7412ec65ec89317b8b2180cabe4f056d440eacab
parent64e048b8dccb2446e9365fe96b4433e99f5f0c11
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: 859a494806a9 ("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>
arch/arm64/crypto/sm4-ce-glue.c