]> git.proxmox.com Git - mirror_ubuntu-artful-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)
commit12fcd92305880504c9827c99ea128fecf1c99f0d
tree49a2ccb419da7504484adba42996282c373d950d
parent4edd7d015b95abcedde591a0c45965305d7cd524
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