mirror-linux/include/crypto
Herbert Xu 6ba620fc91 crypto: api - Add scaffolding to change completion function signature
[ Upstream commit c35e03eaec ]

The crypto completion function currently takes a pointer to a
struct crypto_async_request object.  However, in reality the API
does not allow the use of any part of the object apart from the
data field.  For example, ahash/shash will create a fake object
on the stack to pass along a different data field.

This leads to potential bugs where the user may try to dereference
or otherwise use the crypto_async_request object.

This patch adds some temporary scaffolding so that the completion
function can take a void * instead.  Once affected users have been
converted this can be removed.

The helper crypto_request_complete will remain even after the
conversion is complete.  It should be used instead of calling
the completion function directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: 4140aafcff ("crypto: engine - fix crypto_queue backlog handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:53:40 +02:00
..
internal crypto: aead - Remove unused inline functions from aead 2022-09-30 13:59:13 +08:00
acompress.h
aead.h
aes.h
akcipher.h
algapi.h crypto: api - Add scaffolding to change completion function signature 2023-05-17 11:53:40 +02:00
arc4.h
aria.h crypto: aria - prepare generic module for optimized implementations 2022-09-24 16:14:44 +08:00
authenc.h
b128ops.h
blake2b.h
blake2s.h
blowfish.h
cast5.h
cast6.h
cast_common.h
chacha.h
chacha20poly1305.h
cryptd.h
ctr.h
curve25519.h
des.h
dh.h
drbg.h
ecc_curve.h
ecdh.h
engine.h
gcm.h
gf128mul.h
ghash.h
hash.h crypto: add crypto_has_shash() 2022-08-02 17:14:47 -06:00
hash_info.h
hmac.h
if_alg.h
kdf_sp800108.h
kpp.h crypto: add crypto_has_kpp() 2022-08-02 17:14:47 -06:00
md5.h
nhpoly1305.h
null.h
padlock.h
pcrypt.h
pkcs7.h
poly1305.h
polyval.h crypto: x86/polyval - Add PCLMULQDQ accelerated implementation of POLYVAL 2022-06-10 16:40:17 +08:00
public_key.h
rng.h
scatterwalk.h crypto: scatterwalk - Remove unused inline function scatterwalk_aligned() 2022-09-30 13:59:13 +08:00
serpent.h
sha1.h
sha1_base.h
sha2.h
sha3.h
sha256_base.h
sha512_base.h
skcipher.h
sm2.h
sm3.h
sm3_base.h
sm4.h
streebog.h
twofish.h
xts.h