1
0
Fork 0
alistair23-linux/arch/x86/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
..
Makefile crypto: x86/chacha20 - refactor to allow varying number of rounds 2018-12-13 18:24:58 +08:00
aegis128-aesni-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
aegis128-aesni-glue.c crypto: x86/aegis128 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
aegis128l-aesni-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
aegis128l-aesni-glue.c crypto: x86/aegis128l - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
aegis256-aesni-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
aegis256-aesni-glue.c crypto: x86/aegis256 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
aes-i586-asm_32.S crypto: x86/aes - assembler clean-ups: use ENTRY/ENDPROC, localize jump targets 2013-01-20 10:16:47 +11:00
aes-x86_64-asm_64.S crypto: x86/aes - Don't use %rbp as temporary register 2017-05-23 12:52:05 +08:00
aes_ctrby8_avx-x86_64.S crypto, x86: aesni - fix token pasting for clang 2017-03-24 22:02:55 +08:00
aes_glue.c crypto: prefix module autoloading with "crypto-" 2014-11-24 22:43:57 +08:00
aesni-intel_asm.S Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-29 13:38:39 -07:00
aesni-intel_avx-x86_64.S crypto: aesni - Add scatter/gather avx stubs, and use them in C 2018-12-23 11:52:43 +08:00
aesni-intel_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
blowfish-x86_64-asm_64.S crypto: x86/blowfish - Fix RBP usage 2017-09-20 17:42:31 +08:00
blowfish_glue.c crypto: x86/blowfish: convert to skcipher interface 2018-03-03 00:03:29 +08:00
camellia-aesni-avx-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-12 00:14:29 +01:00
camellia-aesni-avx2-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-12 00:14:29 +01:00
camellia-x86_64-asm_64.S crypto: x86/camellia - Fix RBP usage 2017-09-20 17:42:31 +08:00
camellia_aesni_avx2_glue.c crypto: x86/camellia-aesni-avx, avx2 - convert to skcipher interface 2018-03-03 00:03:32 +08:00
camellia_aesni_avx_glue.c crypto: x86/camellia-aesni-avx, avx2 - convert to skcipher interface 2018-03-03 00:03:32 +08:00
camellia_glue.c crypto: x86/camellia - convert to skcipher interface 2018-03-03 00:03:32 +08:00
cast5-avx-x86_64-asm_64.S crypto: x86/cast5 - Fix RBP usage 2017-09-20 17:42:32 +08:00
cast5_avx_glue.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
cast6-avx-x86_64-asm_64.S crypto: x86/cast6 - Fix RBP usage 2017-09-20 17:42:33 +08:00
cast6_avx_glue.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
chacha-avx2-x86_64.S crypto: x86/chacha20 - refactor to allow varying number of rounds 2018-12-13 18:24:58 +08:00
chacha-avx512vl-x86_64.S crypto: x86/chacha20 - refactor to allow varying number of rounds 2018-12-13 18:24:58 +08:00
chacha-ssse3-x86_64.S crypto: x86/chacha20 - refactor to allow varying number of rounds 2018-12-13 18:24:58 +08:00
chacha_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
crc32-pclmul_asm.S crypto: crc32-pclmul - remove useless relative addressing 2017-10-07 12:10:30 +08:00
crc32-pclmul_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
crc32c-intel_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
crc32c-pcl-intel-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-12 00:14:29 +01:00
crct10dif-pcl-asm_64.S crypto: x86/crct10dif-pcl - cleanup and optimizations 2019-02-08 15:29:48 +08:00
crct10dif-pclmul_glue.c crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-04-08 14:42:54 +08:00
des3_ede-asm_64.S crypto: x86/des3_ede - Fix RBP usage 2017-09-20 17:42:34 +08:00
des3_ede_glue.c crypto: x86/des3_ede - des3_ede_skciphers[] can be static 2018-03-09 22:45:53 +08:00
ghash-clmulni-intel_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
ghash-clmulni-intel_glue.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
glue_helper-asm-avx.S crypto: x86 - add more optimized XTS-mode for serpent-avx 2013-04-25 21:01:51 +08:00
glue_helper-asm-avx2.S crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher 2013-04-25 21:09:05 +08:00
glue_helper.c crypto: x86/glue_helper - rename glue_skwalk_fpu_begin() 2018-03-03 00:03:35 +08:00
morus640-sse2-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
morus640-sse2-glue.c crypto: x86/morus640 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
morus640_glue.c crypto: x86/morus640 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
morus1280-avx2-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
morus1280-avx2-glue.c crypto: x86/morus1280 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
morus1280-sse2-asm.S Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-08-13 13:35:26 -07:00
morus1280-sse2-glue.c crypto: x86/morus1280 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
morus1280_glue.c crypto: x86/morus1280 - convert to use AEAD SIMD helpers 2019-03-22 20:57:26 +08:00
nh-avx2-x86_64.S crypto: x86/nhpoly1305 - add AVX2 accelerated NHPoly1305 2018-12-13 18:24:57 +08:00
nh-sse2-x86_64.S crypto: x86/nhpoly1305 - add SSE2 accelerated NHPoly1305 2018-12-13 18:24:57 +08:00
nhpoly1305-avx2-glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
nhpoly1305-sse2-glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
poly1305-avx2-x86_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
poly1305-sse2-x86_64.S crypto: x86/poly1305 - Clear key material from stack in SSE2 variant 2019-02-28 14:17:59 +08:00
poly1305_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
serpent-avx-x86_64-asm_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
serpent-avx2-asm_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
serpent-sse2-i586-asm_32.S crypto: x86/serpent - use ENTRY/ENDPROC for assember functions and localize jump targets 2013-01-20 10:16:50 +11:00
serpent-sse2-x86_64-asm_64.S crypto: x86/serpent - use ENTRY/ENDPROC for assember functions and localize jump targets 2013-01-20 10:16:50 +11:00
serpent_avx2_glue.c crypto: x86/serpent-avx,avx2 - convert to skcipher interface 2018-03-03 00:03:22 +08:00
serpent_avx_glue.c crypto: x86/serpent-avx,avx2 - convert to skcipher interface 2018-03-03 00:03:22 +08:00
serpent_sse2_glue.c crypto: x86/serpent-sse2 - convert to skcipher interface 2018-03-03 00:03:20 +08:00
sha1_avx2_x86_64_asm.S crypto: x86/sha1-avx2 - Fix RBP usage 2017-09-20 17:42:34 +08:00
sha1_ni_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha1_ssse3_asm.S x86/asm/64: Use 32-bit XOR to zero registers 2018-07-03 09:59:29 +02:00
sha1_ssse3_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha256-avx-asm.S crypto: x86/sha256-avx - Fix RBP usage 2017-09-20 17:42:36 +08:00
sha256-avx2-asm.S crypto: x86/sha256-avx2 - Fix RBP usage 2017-09-20 17:42:36 +08:00
sha256-ssse3-asm.S crypto: x86/sha256-ssse3 - Fix RBP usage 2017-09-20 17:42:37 +08:00
sha256_ni_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha256_ssse3_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha512-avx-asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha512-avx2-asm.S crypto: sha512-avx2 - Fix RBP usage 2017-09-20 17:42:37 +08:00
sha512-ssse3-asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha512_ssse3_glue.c crypto: x86 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
twofish-avx-x86_64-asm_64.S crypto: x86/twofish - Fix RBP usage 2017-09-20 17:42:38 +08:00
twofish-i586-asm_32.S crypto: x86/twofish - assembler clean-ups: use ENTRY/ENDPROC, localize jump labels 2013-01-20 10:16:51 +11:00
twofish-x86_64-asm_64-3way.S crypto: x86/twofish-3way - Fix %rbp usage 2017-12-28 17:56:44 +11:00
twofish-x86_64-asm_64.S x86/asm: Replace "MOVQ $imm, %reg" with MOVL 2015-04-01 13:17:39 +02:00
twofish_avx_glue.c crypto: x86/twofish-avx - convert to skcipher interface 2018-03-03 00:03:25 +08:00
twofish_glue.c crypto: prefix module autoloading with "crypto-" 2014-11-24 22:43:57 +08:00
twofish_glue_3way.c crypto: x86/twofish-3way - convert to skcipher interface 2018-03-03 00:03:24 +08:00