2019-05-27 08:55:01 +02:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-09 15:54:47 +02:00
|
|
|
|
2020-12-11 13:27:15 +01:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:13 -08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
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-07-24 11:28:04 +01:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:13 -08:00
|
|
|
|
2018-04-09 15:54:47 +02:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
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-07-24 11:28:04 +01:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2024-01-16 10:43:02 +00:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:13 -08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
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-07-24 11:28:04 +01:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:13 -08:00
|
|
|
|
2018-04-09 15:54:47 +02:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2007-11-20 17:49:49 +08:00
|
|
|
|
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-07-24 11:28:04 +01:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2024-01-16 10:43:02 +00:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2007-01-01 18:37:02 +11:00
|
|
|
|
|
|
|
|
|
2019-12-20 13:29:40 +08:00
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2019-12-20 13:29:40 +08:00
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-22 20:08:27 +08:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-11 21:57:42 -07:00
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-03 20:16:22 -08:00
|
|
|
|
2014-11-24 16:32:38 -08:00
|
|
|
|
2020-12-11 13:27:15 +01:00
|
|
|
|