1
0
Fork 0
alistair23-linux/arch
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
..
alpha Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
arc kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
arm crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
arm64 crypto: arm64/aes-neonbs - don't access already-freed walk.iv 2019-04-18 22:14:58 +08:00
c6x kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
csky kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
h8300 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
hexagon kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
ia64 Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
m68k kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
microblaze Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
mips Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
nds32 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
nios2 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
openrisc kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
parisc Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
powerpc crypto: powerpc - convert to use crypto_simd_usable() 2019-04-18 22:15:04 +08:00
riscv kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
s390 crypto: s390 - Forbid 2-key 3DES in FIPS mode 2019-04-18 22:14:59 +08:00
sh kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
sparc crypto: sparc - Forbid 2-key 3DES in FIPS mode 2019-04-18 22:14:59 +08:00
um Merge branch 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2019-03-15 15:07:32 -07:00
unicore32 kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
x86 crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
xtensa kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
.gitignore
Kconfig Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00