1
0
Fork 0
alistair23-linux/arch/arm/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
..
.gitignore crypto: arm - ignore generated SHA2 assembly files 2015-07-06 16:32:03 +08:00
Kconfig crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 2018-11-20 14:26:56 +08:00
Makefile Kbuild updates for v4.21 2018-12-29 12:03:17 -08:00
aes-ce-core.S crypto: arm/aes-ce - update IV after partial final CTR block 2019-02-22 12:47:27 +08:00
aes-ce-glue.c crypto: aes-ce - Remove duplicate header 2018-11-16 14:09:40 +08:00
aes-cipher-core.S crypto: arm/aes - add some hardening against cache-timing attacks 2018-11-09 17:36:48 +08:00
aes-cipher-glue.c crypto: arm/aes - replace scalar AES cipher 2017-01-13 00:26:50 +08:00
aes-neonbs-core.S crypto: arm/aes - don't use IV buffer to return final keystream block 2017-02-03 18:16:21 +08:00
aes-neonbs-glue.c crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-04-18 22:14:58 +08:00
chacha-neon-core.S crypto: arm/chacha20 - refactor to allow varying number of rounds 2018-11-20 14:26:56 +08:00
chacha-neon-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
crc32-ce-core.S crypto: arm/crc32 - fix build error with outdated binutils 2017-03-01 19:47:51 +08:00
crc32-ce-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
crct10dif-ce-core.S crypto: arm/crct10dif-ce - cleanup and optimizations 2019-02-08 15:29:48 +08:00
crct10dif-ce-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
ghash-ce-core.S crypto: arm/ghash-ce - implement support for 4-way aggregation 2018-09-04 11:37:04 +08:00
ghash-ce-glue.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
nh-neon-core.S crypto: arm/nhpoly1305 - add NEON-accelerated NHPoly1305 2018-11-20 14:26:56 +08:00
nhpoly1305-neon-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha1-armv4-large.S crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha1-armv7-neon.S crypto: arm/sha1-neon - add support for building in Thumb2 mode 2016-09-07 21:08:29 +08:00
sha1-ce-core.S crypto: arm/sha1-ce - move SHA-1 ARMv8 implementation to base layer 2015-04-10 21:39:44 +08:00
sha1-ce-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha1_glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha1_neon_glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha2-ce-core.S crypto: arm/sha2-ce - move SHA-224/256 ARMv8 implementation to base layer 2015-04-10 21:39:45 +08:00
sha2-ce-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha256-armv4.pl crypto: sha256/arm - fix crash bug in Thumb2 build 2019-02-22 12:40:56 +08:00
sha256-core.S_shipped crypto: sha256/arm - fix crash bug in Thumb2 build 2019-02-22 12:40:56 +08:00
sha256_glue.c treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
sha256_glue.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sha256_neon_glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha512-armv4.pl crypto: sha512/arm - fix crash bug in Thumb2 build 2019-02-22 12:40:56 +08:00
sha512-core.S_shipped crypto: sha512/arm - fix crash bug in Thumb2 build 2019-02-22 12:40:56 +08:00
sha512-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512-neon-glue.c crypto: arm - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha512.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00