linux-stable/arch/sparc/crypto
Ard Biesheuvel 45fe93dff2 crypto: algapi - make crypto_xor() take separate dst and src arguments
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>
2017-08-04 09:27:15 +08:00
..
aes_asm.S sparc64: Fix unrolled AES 256-bit key loops. 2012-12-19 15:19:11 -08:00
aes_glue.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
camellia_asm.S sparc64: Fix function argument comment in camellia_sparc64_key_expand asm. 2012-09-21 12:04:51 -07:00
camellia_glue.c crypto: sparc - initialize blkcipher.ivsize 2015-10-08 21:36:48 +08:00
crc32c_asm.S sparc64: Avoid code duplication in crypto assembler. 2012-08-31 12:11:51 -07:00
crc32c_glue.c crypto: prefix module autoloading with "crypto-" 2014-11-24 22:43:57 +08:00
crop_devid.c sparc64: Add auto-loading mechanism to crypto-opcode drivers. 2012-09-15 09:46:25 -07:00
des_asm.S sparc64: Fix ECB looping constructs in AES code. 2012-12-19 15:30:07 -08:00
des_glue.c crypto: sparc - initialize blkcipher.ivsize 2015-10-08 21:36:48 +08:00
Makefile sparc64: Fix build with mix of modular vs. non-modular crypto drivers. 2012-11-09 20:55:16 -08:00
md5_asm.S sparc64: Avoid code duplication in crypto assembler. 2012-08-31 12:11:51 -07:00
md5_glue.c crypto: sparc/md5 - use md5 IV MD5_HX instead of their raw value 2015-05-18 12:20:20 +08:00
opcodes.h sparc64: Adjust crypto priorities. 2012-09-15 09:06:30 -07:00
sha1_asm.S sparc64: Avoid code duplication in crypto assembler. 2012-08-31 12:11:51 -07:00
sha1_glue.c crypto: prefix module autoloading with "crypto-" 2014-11-24 22:43:57 +08:00
sha256_asm.S sparc64: Avoid code duplication in crypto assembler. 2012-08-31 12:11:51 -07:00
sha256_glue.c crypto: sparc - replace memset by memzero_explicit 2014-12-02 22:55:48 +08:00
sha512_asm.S sparc64: Avoid code duplication in crypto assembler. 2012-08-31 12:11:51 -07:00
sha512_glue.c crypto: sparc - replace memset by memzero_explicit 2014-12-02 22:55:48 +08:00