DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/qat: fix cleanup function default behaviour
@ 2022-06-15  5:57 Arek Kusztal
  2022-06-17 12:59 ` Zhang, Roy Fan
  0 siblings, 1 reply; 3+ messages in thread
From: Arek Kusztal @ 2022-06-15  5:57 UTC (permalink / raw)
  To: dev; +Cc: gakhil, roy.fan.zhang, Arek Kusztal

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@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] crypto/qat: fix cleanup function default behaviour
  2022-06-15  5:57 [PATCH] crypto/qat: fix cleanup function default behaviour Arek Kusztal
@ 2022-06-17 12:59 ` Zhang, Roy Fan
  2022-06-21 10:25   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Roy Fan @ 2022-06-17 12:59 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: gakhil

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] crypto/qat: fix cleanup function default behaviour
  2022-06-17 12:59 ` Zhang, Roy Fan
@ 2022-06-21 10:25   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2022-06-21 10:25 UTC (permalink / raw)
  To: Zhang, Roy Fan, Kusztal, ArkadiuszX, dev

> > 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@intel.com>
> > ---
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-21 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15  5:57 [PATCH] crypto/qat: fix cleanup function default behaviour Arek Kusztal
2022-06-17 12:59 ` Zhang, Roy Fan
2022-06-21 10:25   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).