mirror of https://gitee.com/openkylin/linux.git
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> |
||
---|---|---|
.. | ||
Makefile | ||
aes_asm.S | ||
aes_glue.c | ||
camellia_asm.S | ||
camellia_glue.c | ||
crc32c_asm.S | ||
crc32c_glue.c | ||
crop_devid.c | ||
des_asm.S | ||
des_glue.c | ||
md5_asm.S | ||
md5_glue.c | ||
opcodes.h | ||
sha1_asm.S | ||
sha1_glue.c | ||
sha256_asm.S | ||
sha256_glue.c | ||
sha512_asm.S | ||
sha512_glue.c |