2019-05-19 15:51:43 +02:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-11 13:27:15 +01:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
2011-05-27 14:41:48 -04:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2006-11-17 13:43:04 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
crypto: xcbc - remove unnecessary alignment logic
The xcbc template is setting its alignmask to that of its underlying
'cipher'. Yet, it doesn't care itself about how its inputs and outputs
are aligned, which is ostensibly the point of the alignmask. Instead,
xcbc actually just uses its alignmask itself to runtime-align certain
fields in its tfm and desc contexts appropriately for its underlying
cipher. That is almost entirely pointless too, though, since xcbc is
already using the cipher API functions that handle alignment themselves,
and few ciphers set a nonzero alignmask anyway. Also, even without
runtime alignment, an alignment of at least 4 bytes can be guaranteed.
Thus, at best this code is optimizing for the rare case of ciphers that
set an alignmask >= 7, at the cost of hurting the common cases.
Therefore, this patch removes the manual alignment code from xcbc and
makes it stop setting an alignmask.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-18 22:53:36 -07:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
2018-08-07 14:18:35 -07:00
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
crypto: xcbc - remove unnecessary alignment logic
The xcbc template is setting its alignmask to that of its underlying
'cipher'. Yet, it doesn't care itself about how its inputs and outputs
are aligned, which is ostensibly the point of the alignmask. Instead,
xcbc actually just uses its alignmask itself to runtime-align certain
fields in its tfm and desc contexts appropriately for its underlying
cipher. That is almost entirely pointless too, though, since xcbc is
already using the cipher API functions that handle alignment themselves,
and few ciphers set a nonzero alignmask anyway. Also, even without
runtime alignment, an alignment of at least 4 bytes can be guaranteed.
Thus, at best this code is optimizing for the rare case of ciphers that
set an alignmask >= 7, at the cost of hurting the common cases.
Therefore, this patch removes the manual alignment code from xcbc and
makes it stop setting an alignmask.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-18 22:53:36 -07:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2018-08-07 14:18:35 -07:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
|
|
|
|
|
2006-12-10 10:45:28 +11:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
crypto: xcbc - remove unnecessary alignment logic
The xcbc template is setting its alignmask to that of its underlying
'cipher'. Yet, it doesn't care itself about how its inputs and outputs
are aligned, which is ostensibly the point of the alignmask. Instead,
xcbc actually just uses its alignmask itself to runtime-align certain
fields in its tfm and desc contexts appropriately for its underlying
cipher. That is almost entirely pointless too, though, since xcbc is
already using the cipher API functions that handle alignment themselves,
and few ciphers set a nonzero alignmask anyway. Also, even without
runtime alignment, an alignment of at least 4 bytes can be guaranteed.
Thus, at best this code is optimizing for the rare case of ciphers that
set an alignmask >= 7, at the cost of hurting the common cases.
Therefore, this patch removes the manual alignment code from xcbc and
makes it stop setting an alignmask.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-18 22:53:36 -07:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-17 10:05:58 +11:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2020-01-02 19:59:05 -08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2006-12-17 10:05:58 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2006-12-17 10:05:58 +11:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2020-01-02 19:59:04 -08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2020-07-09 23:20:38 -07:00
|
|
|
|
2007-01-01 18:37:02 +11:00
|
|
|
|
|
|
|
|
|
2020-07-09 23:20:38 -07:00
|
|
|
|
2007-01-01 18:37:02 +11:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2007-01-01 18:37:02 +11:00
|
|
|
|
2020-01-02 19:59:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2020-01-02 19:59:04 -08:00
|
|
|
|
2020-07-09 23:20:38 -07:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2020-01-02 19:59:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
crypto: xcbc - remove unnecessary alignment logic
The xcbc template is setting its alignmask to that of its underlying
'cipher'. Yet, it doesn't care itself about how its inputs and outputs
are aligned, which is ostensibly the point of the alignmask. Instead,
xcbc actually just uses its alignmask itself to runtime-align certain
fields in its tfm and desc contexts appropriately for its underlying
cipher. That is almost entirely pointless too, though, since xcbc is
already using the cipher API functions that handle alignment themselves,
and few ciphers set a nonzero alignmask anyway. Also, even without
runtime alignment, an alignment of at least 4 bytes can be guaranteed.
Thus, at best this code is optimizing for the rare case of ciphers that
set an alignmask >= 7, at the cost of hurting the common cases.
Therefore, this patch removes the manual alignment code from xcbc and
makes it stop setting an alignmask.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2023-10-18 22:53:36 -07:00
|
|
|
|
|
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2009-07-22 14:37:15 +08:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-18 11:01:04 +08:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
2020-01-02 20:04:38 -08:00
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
2020-01-02 19:59:04 -08:00
|
|
|
|
2020-01-02 20:04:38 -08:00
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
|
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-12 12:48:32 +08:00
|
|
|
|
2006-10-28 13:15:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 16:17:02 +08:00
|
|
|
|
2006-10-28 13:15:24 +10: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
|
|
|
|