linux/crypto
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
..
asymmetric_keys crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
async_tx
842.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ablkcipher.c
acompress.c
adiantum.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
aead.c
aegis.h
aegis128.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
aegis128l.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
aegis256.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
aes_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
aes_ti.c
af_alg.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-03-05 09:09:55 -08:00
ahash.c
akcipher.c crypto: akcipher - default implementations for request callbacks 2019-04-18 22:15:01 +08:00
algapi.c
algboss.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
anubis.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
api.c
arc4.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
authenc.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
authencesn.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
blkcipher.c
blowfish_common.c
blowfish_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
camellia_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cast5_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cast6_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cast_common.c
cbc.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ccm.c crypto: ccm - fix incompatibility between "ccm" and "ccm_base" 2019-04-19 13:53:13 +08:00
cfb.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
chacha20poly1305.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
chacha_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cipher.c
cmac.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
compress.c
crc32_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
crc32c_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
crct10dif_common.c
crct10dif_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cryptd.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
crypto_engine.c
crypto_null.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
crypto_user_base.c
crypto_user_stat.c
crypto_wq.c
ctr.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
cts.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
deflate.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
des_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
dh.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
dh_helper.c
drbg.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
ecb.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ecc.c crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
ecc.h crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
ecc_curve_defs.h crypto: ecc - make ecc into separate module 2019-04-18 22:15:02 +08:00
ecdh.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ecdh_helper.c
echainiv.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ecrdsa.c crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
ecrdsa_defs.h crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
ecrdsa_params.asn1 crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
ecrdsa_pub_key.asn1 crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
fcrypt.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
fips.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
gcm.c crypto: gcm - fix incompatibility between "gcm" and "gcm_base" 2019-04-19 13:53:13 +08:00
gf128mul.c
ghash-generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
hash_info.c
hmac.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
internal.h
jitterentropy-kcapi.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
jitterentropy.c
Kconfig crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
keywrap.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
khazad.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
kpp.c
lrw.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
lz4.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
lz4hc.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
lzo-rle.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
lzo.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
Makefile crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm 2019-04-18 22:15:02 +08:00
md4.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
md5.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
memneq.c
michael_mic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
morus640.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
morus1280.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
nhpoly1305.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
ofb.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
pcbc.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
pcrypt.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
poly1305_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
proc.c
ripemd.h
rmd128.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
rmd160.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
rmd256.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
rmd320.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
rng.c
rsa-pkcs1pad.c crypto: akcipher - new verify API for public key algorithms 2019-04-18 22:15:02 +08:00
rsa.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
scatterwalk.c
scompress.c crypto: scompress - initialize per-CPU variables on each CPU 2019-04-18 22:15:04 +08:00
seed.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
seqiv.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
serpent_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
sha1_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
sha3_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
sha256_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
sha512_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
shash.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
simd.c crypto: simd - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
skcipher.c crypto: skcipher - don't WARN on unprocessed data after slow walk step 2019-04-08 14:42:55 +08:00
sm3_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
sm4_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
streebog_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
tcrypt.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
tcrypt.h
tea.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
testmgr.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
testmgr.h crypto: testmgr - fuzz skciphers against their generic implementation 2019-04-18 22:15:03 +08:00
tgr192.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
twofish_common.c
twofish_generic.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
vmac.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
wp512.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
xcbc.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
xor.c
xts.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00
zstd.c crypto: run initcalls for generic implementations earlier 2019-04-18 22:15:03 +08:00