linux/arch/arm64
Ard Biesheuvel d72b9d4acd crypto: arm64/crct10dif - revert to C code for short inputs
The SIMD routine ported from x86 used to have a special code path
for inputs < 16 bytes, which got lost somewhere along the way.
Instead, the current glue code aligns the input pointer to 16 bytes,
which is not really necessary on this architecture (although it
could be beneficial to performance to expose aligned data to the
the NEON routine), but this could result in inputs of less than
16 bytes to be passed in. This not only fails the new extended
tests that Eric has implemented, it also results in the code
reading past the end of the input, which could potentially result
in crashes when dealing with less than 16 bytes of input at the
end of a page which is followed by an unmapped page.

So update the glue code to only invoke the NEON routine if the
input is at least 16 bytes.

Reported-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 6ef5737f39 ("crypto: arm64/crct10dif - port x86 SSE implementation to arm64")
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-02-01 14:45:52 +08:00
..
boot pci-v4.21-changes 2019-01-05 17:57:34 -08:00
configs ARM: SoC: late updates 2019-01-05 11:30:37 -08:00
crypto crypto: arm64/crct10dif - revert to C code for short inputs 2019-02-01 14:45:52 +08:00
include arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
kernel jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
kvm Kconfig updates for v4.21 2018-12-29 13:03:29 -08:00
lib arm64: string: use asm EXPORT_SYMBOL() 2018-12-10 11:50:12 +00:00
mm arm64 fixes for -rc1 2019-01-05 11:28:39 -08:00
net bpf: arm64: Enable arm64 jit to provide bpf_line_info 2018-12-12 02:16:56 +01:00
xen
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2019-01-05 11:30:37 -08:00
Makefile kasan, arm64: adjust shadow size for tag-based mode 2018-12-28 12:11:43 -08:00