linux/arch/arm64
Ard Biesheuvel 5318d3db46 crypto: arm64/aes-ctr - improve tail handling
Counter mode is a stream cipher chaining mode that is typically used
with inputs that are of arbitrarily length, and so a tail block which
is smaller than a full AES block is rule rather than exception.

The current ctr(aes) implementation for arm64 always makes a separate
call into the assembler routine to process this tail block, which is
suboptimal, given that it requires reloading of the AES round keys,
and prevents us from handling this tail block using the 5-way stride
that we use for better performance on deep pipelines.

So let's update the assembler routine so it can handle any input size,
and uses NEON permutation instructions and overlapping loads and stores
to handle the tail block. This results in a ~16% speedup for 1420 byte
blocks on cores with deep pipelines such as ThunderX2.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-01-03 08:41:37 +11:00
..
boot ARM: device tree updates for 5.11 2020-12-16 16:27:35 -08:00
configs ARM: device tree updates for 5.11 2020-12-16 16:27:35 -08:00
crypto crypto: arm64/aes-ctr - improve tail handling 2021-01-03 08:41:37 +11:00
include EFI updates collected by Ard Biesheuvel: 2020-12-24 12:40:07 -08:00
kernel A treewide cleanup of interrupt descriptor (ab)use with all sorts of racy 2020-12-24 13:50:23 -08:00
kvm ARM: 2020-12-20 10:44:05 -08:00
lib arm64: mte: add in-kernel MTE helpers 2020-12-22 12:55:07 -08:00
mm kasan, arm64: print report from tag fault handler 2020-12-22 12:55:08 -08:00
net arm64: bpf: Fix branch offset in JIT 2020-09-17 12:05:36 +01:00
xen
Kbuild
Kconfig EFI updates collected by Ard Biesheuvel: 2020-12-24 12:40:07 -08:00
Kconfig.debug
Kconfig.platforms ARM: device tree updates for 5.11 2020-12-16 16:27:35 -08:00
Makefile kasan, arm64: expand CONFIG_KASAN checks 2020-12-22 12:55:08 -08:00