DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/qat: fix undefined initial slice
@ 2022-11-07  9:23 Arek Kusztal
  2022-11-07 10:35 ` Ji, Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Arek Kusztal @ 2022-11-07  9:23 UTC (permalink / raw)
  To: dev; +Cc: gakhil, kai.ji, Arek Kusztal

This commit fixes undefined initial value of slice capability.
When unset it could lead to undefined read of capability due to
stack frame picked values, is should therefore be set to 0.

Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/common/qat/qat_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index 057ba60931..8bce2ac073 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -361,7 +361,7 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 {
 	int sym_ret = 0, asym_ret = 0, comp_ret = 0;
 	int num_pmds_created = 0;
-	uint16_t capa;
+	uint16_t capa = 0;
 	struct qat_pci_device *qat_pci_dev;
 	struct qat_dev_hw_spec_funcs *ops_hw;
 	struct qat_dev_cmd_param qat_dev_cmd_param[] = {
-- 
2.13.6


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

* RE: [PATCH] common/qat: fix undefined initial slice
  2022-11-07  9:23 [PATCH] common/qat: fix undefined initial slice Arek Kusztal
@ 2022-11-07 10:35 ` Ji, Kai
  2022-11-08  5:17   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Ji, Kai @ 2022-11-07 10:35 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: gakhil

Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Monday, November 7, 2022 9:24 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Ji, Kai <kai.ji@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH] common/qat: fix undefined initial slice
> 
> This commit fixes undefined initial value of slice capability.
> When unset it could lead to undefined read of capability due to stack frame
> picked values, is should therefore be set to 0.
> 
> Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration")
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> 2.13.6


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

* RE: [PATCH] common/qat: fix undefined initial slice
  2022-11-07 10:35 ` Ji, Kai
@ 2022-11-08  5:17   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2022-11-08  5:17 UTC (permalink / raw)
  To: Ji, Kai, Kusztal, ArkadiuszX, dev

> Acked-by: Kai Ji <kai.ji@intel.com>
> 

You should reply in the bottom.
> > Subject: [PATCH] common/qat: fix undefined initial slice
> >
> > This commit fixes undefined initial value of slice capability.
> > When unset it could lead to undefined read of capability due to stack frame
> > picked values, is should therefore be set to 0.
> >
> > Fixes: b3cbbcdffa4f ("common/qat: read HW slice configuration")
> >
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Applied to dpdk-next-crypto

Thanks.

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

end of thread, other threads:[~2022-11-08  5:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07  9:23 [PATCH] common/qat: fix undefined initial slice Arek Kusztal
2022-11-07 10:35 ` Ji, Kai
2022-11-08  5:17   ` 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).