> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusz...@intel.com>
> Sent: Wednesday, June 15, 2022 6:58 AM
> To: dev@dpdk.org
> Cc: gak...@marvell.com; Zhang, Roy Fan <roy.fan.zh...@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusz...@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.kusz...@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.zh...@intel.com>

Reply via email to