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
..
2019-04-25 15:38:12 +08:00
2018-06-18 20:17:38 +05:30
2019-04-18 22:15:03 +08:00
2018-12-23 11:52:45 +08:00
2018-11-09 17:41:39 +08:00
2019-04-25 15:38:12 +08:00
2019-01-18 18:40:24 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-01-25 18:41:51 +08:00
2019-04-18 22:15:03 +08:00
2018-11-09 17:36:48 +08:00
2019-03-05 09:09:55 -08:00
2019-02-08 15:30:08 +08:00
2019-04-18 22:15:01 +08:00
2019-01-25 18:41:52 +08:00
2019-04-18 22:15:03 +08:00
2018-09-28 12:46:08 +08:00
2018-09-04 11:35:03 +08:00
2018-05-26 09:16:44 +02:00
2018-06-28 10:40:47 -07:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-07-18 07:27:22 -04:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-12-23 11:52:45 +08:00
2011-09-22 21:25:25 +10:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2013-08-14 20:42:03 +10:00
2019-04-18 22:15:03 +08:00
2019-04-19 13:53:13 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-04-21 00:58:34 +08:00
2019-04-18 22:15:03 +08:00
2016-10-21 11:03:42 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2013-09-12 15:31:34 +10:00
2019-04-18 22:15:03 +08:00
2019-04-25 15:38:12 +08:00
2018-02-15 23:26:50 +08:00
2019-04-18 22:15:03 +08:00
2018-12-23 11:52:44 +08:00
2019-01-18 18:43:43 +08:00
2014-03-21 21:54:28 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-08-03 18:06:06 +08:00
2019-04-18 22:15:03 +08:00
2019-04-25 15:38:12 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2017-10-12 22:55:00 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-19 13:53:13 +08:00
2017-12-22 19:52:40 +11:00
2019-04-18 22:15:03 +08:00
2018-11-16 14:09:40 +08:00
2019-04-25 15:38:12 +08:00
2018-09-04 11:37:04 +08:00
2019-04-18 22:15:03 +08:00
2015-06-25 23:18:33 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-11-09 17:41:39 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2013-12-09 20:09:12 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-05-16 07:23:35 +02:00
2017-11-02 11:10:55 +01:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-12-07 14:15:00 +08:00
2018-04-07 19:04:02 +09:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:03 +08:00
2016-07-05 23:05:26 +08:00
2015-10-14 22:23:16 +08:00
2019-04-18 22:15:03 +08:00
2018-08-03 18:06:03 +08:00
2019-04-18 22:15:04 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-25 15:38:12 +08:00
2019-03-22 20:57:27 +08:00
2019-04-08 14:42:55 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2018-09-28 12:46:26 +08:00
2019-04-18 22:15:03 +08:00
2019-04-25 15:38:12 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2017-11-29 17:33:25 +11:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00
2017-11-15 18:21:04 -08:00
2019-04-18 22:15:03 +08:00
2019-04-18 22:15:03 +08:00