Re: [PATCH v2] crypto: caam: fix asynchronous hash

From: Eric Biggers
Date: Wed Jan 24 2024 - 17:05:08 EST


On Thu, Jan 18, 2024 at 02:55:57PM +0530, Gaurav Jain wrote:
> ahash_alg->setkey is updated to ahash_nosetkey in ahash.c
> so checking setkey() function to determine hmac algorithm is not valid.
>
> to fix this added is_hmac variable in structure caam_hash_alg to determine
> whether the algorithm is hmac or not.
>
> Fixes: 2f1f34c1bf7b ("crypto: ahash - optimize performance when wrapping shash")
> Signed-off-by: Gaurav Jain <gaurav.jain@xxxxxxx>
> ---
> changes in v2:
> - remove if condition based on crypto_hash_alg_has_setkey() funcion.
> - added is_hmac variable in caam_hash_alg and updated the if
> condition for checking hmac algorithm.
>
> drivers/crypto/caam/caamalg_qi2.c | 7 +++++--
> drivers/crypto/caam/caamhash.c | 7 +++++--
> 2 files changed, 10 insertions(+), 4 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

- Eric