[PATCH] crypto/qat: fix cleanup function default behaviour

Zhang, Roy Fan roy.fan.zhang at intel.com
Fri Jun 17 14:59:48 CEST 2022


> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal at intel.com>
> Sent: Wednesday, June 15, 2022 6:58 AM
> To: dev at dpdk.org
> Cc: gakhil at marvell.com; Zhang, Roy Fan <roy.fan.zhang at intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal at intel.com>
> Subject: [PATCH] crypto/qat: fix cleanup function default behaviour
> 
> Full cookie data should be cleared by default if not algorithm
> specified. This is protection in case algorithm specific cleanup
> is not implemented.
> 
> Fixes: 3b78aa7b2317 ("crypto/qat: refactor asymmetric crypto functions")
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
> ---
>  drivers/crypto/qat/qat_asym.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
> index e4ab4bf33d..6e43a6cac8 100644
> --- a/drivers/crypto/qat/qat_asym.c
> +++ b/drivers/crypto/qat/qat_asym.c
> @@ -144,6 +144,10 @@ cleanup(struct qat_asym_op_cookie *cookie,
>  			cleanup_arrays(cookie,
> QAT_ASYM_RSA_NUM_IN_PARAMS,
>  				QAT_ASYM_RSA_NUM_OUT_PARAMS,
> alg_size);
>  		}
> +	} else {
> +		cleanup_arrays(cookie, QAT_ASYM_MAX_PARAMS,
> +				QAT_ASYM_MAX_PARAMS,
> +				QAT_PKE_MAX_LN_SIZE);
>  	}
>  }
> 
> --
> 2.13.6
Acked-by: Fan Zhang <roy.fan.zhang at intel.com>



More information about the dev mailing list