]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/aes - replace scalar fallback with plain NEON fallback
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 28 Jan 2017 23:25:39 +0000 (23:25 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Feb 2017 10:16:20 +0000 (18:16 +0800)
commit1249c94648330b8b051602c076e2d434f8ee9ff1
tree49a2ccb419da7504484adba42996282c373d950d
parentdcdd58e5a7b13e31e4c8a1d288828700b5464be8
crypto: arm64/aes - replace scalar fallback with plain NEON fallback

The new bitsliced NEON implementation of AES uses a fallback in two
places: CBC encryption (which is strictly sequential, whereas this
driver can only operate efficiently on 8 blocks at a time), and the
XTS tweak generation, which involves encrypting a single AES block
with a different key schedule.

The plain (i.e., non-bitsliced) NEON code is more suitable as a fallback,
given that it is faster than scalar on low end cores (which is what
the NEON implementations target, since high end cores have dedicated
instructions for AES), and shows similar behavior in terms of D-cache
footprint and sensitivity to cache timing attacks. So switch the fallback
handling to the plain NEON driver.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/Kconfig
arch/arm64/crypto/aes-neonbs-glue.c