aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-02-22 22:54:07 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-28 14:37:48 +0800
commit4b6d196c9cec548a6b1cf5bb07b4a8b8d375829d (patch)
treee6b9e6144f7933b6d5a2f6796ec86e49eabd00ea /virt
parentcrypto: sha512/arm - fix crash bug in Thumb2 build (diff)
downloadlinux-dev-4b6d196c9cec548a6b1cf5bb07b4a8b8d375829d.tar.xz
linux-dev-4b6d196c9cec548a6b1cf5bb07b4a8b8d375829d.zip
crypto: arm64/chacha - fix chacha_4block_xor_neon() for big endian
The change to encrypt a fifth ChaCha block using scalar instructions caused the chacha20-neon, xchacha20-neon, and xchacha12-neon self-tests to start failing on big endian arm64 kernels. The bug is that the keystream block produced in 32-bit scalar registers is directly XOR'd with the data words, which are loaded and stored in native endianness. Thus in big endian mode the data bytes end up XOR'd with the wrong bytes. Fix it by byte-swapping the keystream words in big endian mode. Fixes: 2fe55987b262 ("crypto: arm64/chacha - use combined SIMD/ALU routine for more speed") Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions