diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-07-24 11:28:04 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-08-04 09:27:15 +0800 |
commit | 96692cfc16dbe9963fc4129527fbf2f16c68f5ba (patch) | |
tree | 129459dab152b9c237fa1b921485dcc6a5618161 /crypto/asymmetric_keys/signature.c | |
parent | 52c242295c6afe64158da42e3ca3e04ea768f9c7 (diff) | |
download | linux-crypto-96692cfc16dbe9963fc4129527fbf2f16c68f5ba.tar.gz linux-crypto-96692cfc16dbe9963fc4129527fbf2f16c68f5ba.zip |
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>
Diffstat (limited to 'crypto/asymmetric_keys/signature.c')
0 files changed, 0 insertions, 0 deletions