2019-05-27 08:55:01 +02:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2017-07-06 14:44:56 -04:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-17 23:18:57 +08:00
|
|
|
|
2020-12-11 13:27:15 +01:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
2021-04-06 20:00:03 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2017-07-06 14:44:56 -04:00
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-06 14:44:56 -04:00
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:18:12 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2007-10-21 16:18:12 +08:00
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-03-06 01:42:13 -08:00
|
|
|
|
2007-10-21 16:18:12 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2007-05-24 21:23:24 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-10 19:37:49 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-10-21 16:18:12 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
The CRYPTO_TFM_RES_BAD_KEY_LEN flag was apparently meant as a way to
make the ->setkey() functions provide more information about errors.
However, no one actually checks for this flag, which makes it pointless.
Also, many algorithms fail to set this flag when given a bad length key.
Reviewing just the generic implementations, this is the case for
aes-fixed-time, cbcmac, echainiv, nhpoly1305, pcrypt, rfc3686, rfc4309,
rfc7539, rfc7539esp, salsa20, seqiv, and xcbc. But there are probably
many more in arch/*/crypto/ and drivers/crypto/.
Some algorithms can even set this flag when the key is the correct
length. For example, authenc and authencesn set it when the key payload
is malformed in any way (not just a bad length), the atmel-sha and ccree
drivers can set it if a memory allocation fails, and the chelsio driver
sets it for bad auth tag lengths, not just bad key lengths.
So even if someone actually wanted to start checking this flag (which
seems unlikely, since it's been unused for a long time), there would be
a lot of work needed to get it working correctly. But it would probably
be much better to go back to the drawing board and just define different
return values, like -EINVAL if the key is invalid for the algorithm vs.
-EKEYREJECTED if the key was rejected by a policy like "no weak keys".
That would be much simpler, less error-prone, and easier to test.
So just remove this flag.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-12-30 21:19:36 -06:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-12-30 21:19:38 -06:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
The CRYPTO_TFM_RES_BAD_KEY_LEN flag was apparently meant as a way to
make the ->setkey() functions provide more information about errors.
However, no one actually checks for this flag, which makes it pointless.
Also, many algorithms fail to set this flag when given a bad length key.
Reviewing just the generic implementations, this is the case for
aes-fixed-time, cbcmac, echainiv, nhpoly1305, pcrypt, rfc3686, rfc4309,
rfc7539, rfc7539esp, salsa20, seqiv, and xcbc. But there are probably
many more in arch/*/crypto/ and drivers/crypto/.
Some algorithms can even set this flag when the key is the correct
length. For example, authenc and authencesn set it when the key payload
is malformed in any way (not just a bad length), the atmel-sha and ccree
drivers can set it if a memory allocation fails, and the chelsio driver
sets it for bad auth tag lengths, not just bad key lengths.
So even if someone actually wanted to start checking this flag (which
seems unlikely, since it's been unused for a long time), there would be
a lot of work needed to get it working correctly. But it would probably
be much better to go back to the drawing board and just define different
return values, like -EINVAL if the key is invalid for the algorithm vs.
-EKEYREJECTED if the key was rejected by a policy like "no weak keys".
That would be much simpler, less error-prone, and easier to test.
So just remove this flag.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-12-30 21:19:36 -06:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-30 21:19:38 -06:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2014-05-14 11:40:57 +02:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-14 11:36:38 +02:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2019-10-05 11:11:10 +02:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-10 19:29:33 +08:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2012-12-21 13:14:09 -08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 13:14:09 -08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2017-07-06 14:44:56 -04:00
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
|
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2019-10-10 21:51:32 -07:00
|
|
|
|
|
|
|
|
|
2010-04-19 21:02:41 +08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2014-05-14 11:36:41 +02:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-14 11:36:41 +02:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-06 14:44:56 -04:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 13:14:09 -08:00
|
|
|
|
2006-10-04 18:48:57 +10:00
|
|
|
|
|
|
|
|
|
2012-08-27 15:45:31 +05:30
|
|
|
|
2006-10-04 18:48:57 +10: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
|
|
|
|