android_kernel_msm-6.1_noth.../include/crypto
Herbert Xu 6ba620fc91 crypto: api - Add scaffolding to change completion function signature
[ Upstream commit c35e03eaece71101ff6cbf776b86403860ac8cc3 ]

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: 4140aafcff16 ("crypto: engine - fix crypto_queue backlog handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:53:40 +02:00
..
internal
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
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
hash_info.h
hmac.h
if_alg.h
kdf_sp800108.h
kpp.h
md5.h
nhpoly1305.h
null.h
padlock.h
pcrypt.h
pkcs7.h
poly1305.h
polyval.h
public_key.h
rng.h
scatterwalk.h
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