mbox series

[0/32] crypto: api - Prepare to change callback argument to void star

Message ID Y9jKmRsdHsIwfFLo@gondor.apana.org.au
Headers show
Series crypto: api - Prepare to change callback argument to void star | expand

Message

Herbert Xu Jan. 31, 2023, 8 a.m. UTC
Hi:

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 series lays the groundwork for converting the completion
function to take a void * argument instead of crypto_async_request.

Cheers,

Comments

Giovanni Cabiddu Feb. 1, 2023, 4:45 p.m. UTC | #1
On Tue, Jan 31, 2023 at 04:01:49PM +0800, Herbert Xu wrote:
> Use the crypto_request_complete helper 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>