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
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +08: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
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2025-03-08 20:53:13 +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
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +08: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
|
|
|
|
|
|
|
|
|
2025-03-08 20:53:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-16 12:09:02 +11:00
|
|
|
|
2025-03-08 20:53:13 +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
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 16:17:02 +08: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
|
|
|
|
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
awk -i inplace '
/^#define EXPORT_SYMBOL_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/^#define MODULE_IMPORT_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/MODULE_IMPORT_NS/ {
$0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
}
/EXPORT_SYMBOL_NS/ {
if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
$0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
$0 !~ /^my/) {
getline line;
gsub(/[[:space:]]*\\$/, "");
gsub(/[[:space:]]/, "", line);
$0 = $0 " " line;
}
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 15:59:47 +01:00
|
|
|
|