common/qat: fix undefined initial slice
Checks
Commit Message
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(-)
Comments
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
> 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.
@@ -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[] = {