mirror of
https://github.com/torvalds/linux.git
synced 2024-12-07 11:31:41 +00:00
45fe93dff2
There are quite a number of occurrences in the kernel of the pattern if (dst != src) memcpy(dst, src, walk.total % AES_BLOCK_SIZE); crypto_xor(dst, final, walk.total % AES_BLOCK_SIZE); or crypto_xor(keystream, src, nbytes); memcpy(dst, keystream, nbytes); where crypto_xor() is preceded or followed by a memcpy() invocation that is only there because crypto_xor() uses its output parameter as one of the inputs. To avoid having to add new instances of this pattern in the arm64 code, which will be refactored to implement non-SIMD fallbacks, add an alternative implementation called crypto_xor_cpy(), taking separate input and output arguments. This removes the need for the separate memcpy(). Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
||
---|---|---|
.. | ||
.gitignore | ||
aes_cbc.c | ||
aes_ctr.c | ||
aes_xts.c | ||
aes.c | ||
aesp8-ppc.h | ||
aesp8-ppc.pl | ||
ghash.c | ||
ghashp8-ppc.pl | ||
Kconfig | ||
Makefile | ||
ppc-xlate.pl | ||
vmx.c |