Files
android_kernel_xiaomi_sm8450/include/linux
Eric Biggers 877b5691f2 crypto: shash - remove shash_desc::flags
The flags field in 'struct shash_desc' never actually does anything.
The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
However, no shash algorithm ever sleeps, making this flag a no-op.

With this being the case, inevitably some users who can't sleep wrongly
pass MAY_SLEEP.  These would all need to be fixed if any shash algorithm
actually started sleeping.  For example, the shash_ahash_*() functions,
which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
from the ahash API to the shash API.  However, the shash functions are
called under kmap_atomic(), so actually they're assumed to never sleep.

Even if it turns out that some users do need preemption points while
hashing large buffers, we could easily provide a helper function
crypto_shash_update_large() which divides the data into smaller chunks
and calls crypto_shash_update() and cond_resched() for each chunk.  It's
not necessary to have a flag in 'struct shash_desc', nor is it necessary
to make individual shash algorithms aware of this at all.

Therefore, remove shash_desc::flags, and document that the
crypto_shash_*() functions can be called from any context.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-04-25 15:38:12 +08:00
..
2018-11-14 10:56:33 -08:00
2019-02-15 16:47:55 +02:00
2018-10-16 11:13:50 +02:00
2018-11-12 10:33:49 +01:00
2019-02-28 09:16:12 +01:00
2019-02-08 22:39:01 -08:00
2016-07-08 16:23:11 +02:00
2010-11-23 20:14:46 +00:00
2018-05-26 09:16:44 +02:00
2012-10-08 13:50:20 +10:30
2018-06-15 18:10:01 -03:00
2019-03-06 10:46:29 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2011-03-11 14:25:50 +00:00
2017-06-08 18:52:36 -07:00
2019-02-24 08:20:17 -07:00
2019-01-24 11:11:45 -07:00
2018-11-07 13:44:59 -07:00
2018-11-07 13:44:59 -07:00
2019-02-15 08:40:12 -07:00
2019-02-01 20:55:38 +01:00
2019-02-27 17:22:50 +01:00
2019-02-01 20:55:38 +01:00
2017-11-15 18:21:04 -08:00
2018-06-15 18:10:01 -03:00
2018-03-26 15:09:38 +02:00
2018-08-22 10:52:48 -07:00
2017-08-24 13:23:03 -07:00
2012-02-20 19:46:36 +11:00
2009-12-10 23:52:01 +00:00
2016-10-28 08:48:16 -06:00
2018-11-13 21:55:24 +01:00
2012-10-16 18:49:15 -07:00
2019-02-28 03:28:53 -05:00
2018-01-01 12:40:27 -07:00
2019-03-12 18:59:17 -07:00
2017-08-07 17:22:14 +02:00
2014-12-31 13:06:50 -05:00
2019-02-28 08:24:23 -07:00
2018-12-19 10:42:08 +01:00
2017-11-13 01:41:20 +01:00
2014-10-08 16:01:41 -04:00
2018-07-27 09:57:23 +10:00
2019-03-12 10:04:02 -07:00
2019-03-05 21:07:16 -08:00
2019-02-15 16:54:38 +01:00
2010-02-09 11:13:56 +01:00
2019-03-12 10:04:00 -07:00
2012-03-26 21:47:19 +02:00
2018-10-21 10:46:33 -04:00
2018-12-07 12:59:08 -08:00
2019-03-09 19:52:47 -08:00
2018-03-26 08:53:43 -06:00
2018-11-07 13:42:32 -07:00
2006-10-10 15:37:22 -07:00
2019-02-24 08:20:17 -07:00
2018-11-19 19:03:46 -07:00
2018-06-22 13:43:27 +09:00
2016-05-11 22:37:54 +02:00
2014-03-13 12:11:00 +10:30
2016-01-28 14:19:12 -08:00
2018-04-11 10:28:38 -07:00
2015-07-28 08:50:42 +01:00
2017-11-15 18:21:01 -08:00
2018-12-06 13:57:03 +01:00
2018-07-12 21:35:28 +02:00
2009-04-06 16:06:26 +01:00
2017-12-01 13:09:40 -08:00
2018-11-30 13:29:04 +00:00
2019-01-11 20:51:24 +01:00
2018-04-12 09:41:19 -07:00
2017-02-24 17:46:57 -08:00
2019-03-07 18:32:03 -08:00
2017-08-28 20:51:22 +02:00
2018-06-07 17:34:35 -07:00
2019-01-04 13:13:48 -08:00
2015-06-24 17:49:41 -07:00
2019-03-12 10:04:01 -07:00
2018-06-07 17:34:39 -07:00
2018-03-26 13:14:43 -04:00
2018-03-26 13:14:43 -04:00
2019-01-30 20:51:47 -05:00
2018-10-17 13:56:58 -07:00
2016-04-25 15:09:11 -04:00
2019-02-20 07:22:17 -07:00
2019-02-20 07:22:10 -07:00
2018-12-06 15:45:46 +01:00
2019-02-08 15:02:49 -08:00
2018-01-08 08:22:45 -06:00
2018-07-10 17:22:35 +02:00
2018-06-07 17:34:36 -07:00
2019-03-05 21:07:19 -08:00
2018-10-21 10:46:39 -04:00
2017-11-09 10:23:28 +01:00
2018-09-18 17:52:15 -05:00
2018-07-19 11:34:23 +01:00
2018-10-26 16:26:35 -07:00
2019-03-03 21:47:57 -08:00
2017-11-17 16:10:04 -08:00
2019-02-01 02:01:45 -05:00
2017-11-13 01:33:48 +01:00
2018-10-08 22:53:10 +11:00
2019-03-12 10:04:03 -07:00
2010-08-04 21:53:17 -07:00
2018-12-03 17:11:02 -08:00
2018-07-20 01:11:45 +02:00
2018-08-02 17:33:06 -04:00
2018-05-11 17:28:45 -07:00
2019-01-07 16:38:26 +01:00
2016-03-22 15:36:02 -07:00
2019-02-25 21:20:45 +01:00
2018-09-25 20:17:35 -07:00
2018-03-01 08:33:05 -07:00
2017-11-07 12:22:21 +01:00
2009-04-08 14:33:38 -07:00
2018-07-07 17:25:23 +02:00
2018-07-03 09:20:44 +02:00
2019-02-03 11:17:31 -08:00
2018-08-16 12:14:42 -07:00
2019-02-07 16:38:35 +01:00
2018-01-15 12:07:46 -08:00
2013-04-30 15:50:12 +05:30
2018-06-20 11:35:56 +02:00
2018-09-29 22:47:49 -04:00
2018-02-06 18:32:47 -08:00
2018-10-11 09:16:44 -07:00
2010-03-25 17:18:43 -07:00
2019-02-07 00:13:27 +01:00
2018-12-10 10:17:45 +01:00
2018-09-25 20:33:24 +02:00
2019-01-11 18:05:40 -08:00
2005-04-16 15:20:36 -07:00
2018-02-06 18:32:44 -08:00
2014-11-28 16:08:16 +01:00
2017-12-20 09:53:54 -07:00
2019-02-26 12:53:55 +01:00
2018-09-11 14:11:51 +02:00
2018-12-22 12:15:29 +01:00
2015-03-24 09:48:14 -07:00
2018-05-14 09:51:34 -04:00
2011-01-13 08:03:24 -08:00
2013-10-17 15:53:09 -04:00
2017-08-15 09:02:08 -07:00