DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] fix coverity reported issues
@ 2020-05-05 19:17 Ajit Khaparde
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-05 19:17 UTC (permalink / raw)
  To: dev

Fix issues reported by Coverity.
Note that one issue was reported in internal coverity scan.

Ajit Khaparde (1):
  net/bnxt: fix uninitialized variable error

Kishore Padmanabha (1):
  net/bnxt: fix overrun of the ulp device params array

 drivers/net/bnxt/tf_core/tf_tbl.c         | 2 +-
 drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.1 (Apple Git-122.3)


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

* [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-05 19:17 [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
@ 2020-05-05 19:17 ` Ajit Khaparde
  2020-05-06  9:17   ` Ferruh Yigit
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-05 19:17 UTC (permalink / raw)
  To: dev; +Cc: Kishore Padmanabha, Michael Baucom

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Fix a buffer overrun issue spotted by coverity while accessing
the array ulp_device_params.

Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
index 86384169f..e89aefad4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
@@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = {
 	}
 };
 
-struct bnxt_ulp_device_params ulp_device_params[] = {
+struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
 	[BNXT_ULP_DEVICE_ID_WH_PLUS] = {
 		.global_fid_enable       = BNXT_ULP_SYM_YES,
 		.byte_order              = (enum bnxt_ulp_byte_order)
-- 
2.21.1 (Apple Git-122.3)


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

* [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error
  2020-05-05 19:17 [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
@ 2020-05-05 19:17 ` Ajit Khaparde
  2020-05-06  9:13   ` Ferruh Yigit
  2020-05-06  1:40 ` [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
  2020-05-07  3:11 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
  3 siblings, 1 reply; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-05 19:17 UTC (permalink / raw)
  To: dev; +Cc: Somnath Kotur, Randy Schacher

Fix uninitialized variable error reported by coverity.

Fixes: d33b68154fa4 ("net/bnxt: add tf_core table scope support")
Coverity issue: 357771

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_tbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c
index 93f387e86..d900c9c09 100644
--- a/drivers/net/bnxt/tf_core/tf_tbl.c
+++ b/drivers/net/bnxt/tf_core/tf_tbl.c
@@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
 {
 	struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
 	struct tf_em_table *tbl;
-	int rc;
+	int rc = 0;
 	int i;
 
 	for (i = KEY0_TABLE; i < MAX_TABLE; i++) {
-- 
2.21.1 (Apple Git-122.3)


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

* Re: [dpdk-dev] [PATCH 0/2] fix coverity reported issues
  2020-05-05 19:17 [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
@ 2020-05-06  1:40 ` Ajit Khaparde
  2020-05-07  3:11 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
  3 siblings, 0 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-06  1:40 UTC (permalink / raw)
  To: dpdk-dev

On Tue, May 5, 2020 at 12:18 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> Fix issues reported by Coverity.
> Note that one issue was reported in internal coverity scan.
>
Patches applied to dpdk-next-net-brcm.



>
> Ajit Khaparde (1):
>   net/bnxt: fix uninitialized variable error
>
> Kishore Padmanabha (1):
>   net/bnxt: fix overrun of the ulp device params array
>
>  drivers/net/bnxt/tf_core/tf_tbl.c         | 2 +-
>  drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.21.1 (Apple Git-122.3)
>
>

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

* Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
@ 2020-05-06  9:13   ` Ferruh Yigit
  2020-05-07 18:55     ` Ajit Khaparde
  0 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2020-05-06  9:13 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Somnath Kotur, Randy Schacher

On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
> Fix uninitialized variable error reported by coverity.
> 
> Fixes: d33b68154fa4 ("net/bnxt: add tf_core table scope support")

The commit id and the patch title doesn't exist in next-net (also not int
next-net-brcm), I guess you mean [1] but the updated function below
('tf_em_ctx_reg()') even not exist in that commit.

Can you please check the tag again?

[1] net/bnxt: support TruFlow core table scope

> Coverity issue: 357771
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
> ---
>  drivers/net/bnxt/tf_core/tf_tbl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c
> index 93f387e86..d900c9c09 100644
> --- a/drivers/net/bnxt/tf_core/tf_tbl.c
> +++ b/drivers/net/bnxt/tf_core/tf_tbl.c
> @@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
>  {
>  	struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
>  	struct tf_em_table *tbl;
> -	int rc;
> +	int rc = 0;
>  	int i;
>  
>  	for (i = KEY0_TABLE; i < MAX_TABLE; i++) {
> 


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

* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-05 19:17 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
@ 2020-05-06  9:17   ` Ferruh Yigit
  2020-05-06 22:14     ` Ajit Khaparde
  0 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2020-05-06  9:17 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: Kishore Padmanabha, Michael Baucom

On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
> From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> 
> Fix a buffer overrun issue spotted by coverity while accessing
> the array ulp_device_params.

If it is spotted by coverity, is there a coverity issue id?

> 
> Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")
> 
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> index 86384169f..e89aefad4 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> @@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = {
>  	}
>  };
>  
> -struct bnxt_ulp_device_params ulp_device_params[] = {
> +struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
>  	[BNXT_ULP_DEVICE_ID_WH_PLUS] = {
>  		.global_fid_enable       = BNXT_ULP_SYM_YES,
>  		.byte_order              = (enum bnxt_ulp_byte_order)
> 


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

* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-06  9:17   ` Ferruh Yigit
@ 2020-05-06 22:14     ` Ajit Khaparde
  2020-05-07  0:09       ` Ferruh Yigit
  0 siblings, 1 reply; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-06 22:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk-dev, Kishore Padmanabha, Michael Baucom

On Wed, May 6, 2020 at 2:17 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
> > From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> >
> > Fix a buffer overrun issue spotted by coverity while accessing
> > the array ulp_device_params.
>
> If it is spotted by coverity, is there a coverity issue id?
>
Yes. But in an internal scan.
I haven't seen anything reported in this area in the latest coverity report
against 20.05-rc1.


> >
> > Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")
> >
> > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> > Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
> > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> >  drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> > index 86384169f..e89aefad4 100644
> > --- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> > +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> > @@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] =
> {
> >       }
> >  };
> >
> > -struct bnxt_ulp_device_params ulp_device_params[] = {
> > +struct bnxt_ulp_device_params
> ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
> >       [BNXT_ULP_DEVICE_ID_WH_PLUS] = {
> >               .global_fid_enable       = BNXT_ULP_SYM_YES,
> >               .byte_order              = (enum bnxt_ulp_byte_order)
> >
>
>

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

* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-06 22:14     ` Ajit Khaparde
@ 2020-05-07  0:09       ` Ferruh Yigit
  2020-05-07  3:14         ` Ajit Khaparde
  0 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2020-05-07  0:09 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk-dev, Kishore Padmanabha, Michael Baucom, John McNamara

On 5/6/2020 11:14 PM, Ajit Khaparde wrote:
> 
> 
> On Wed, May 6, 2020 at 2:17 AM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
>     > From: Kishore Padmanabha <kishore.padmanabha@broadcom.com
>     <mailto:kishore.padmanabha@broadcom.com>>
>     >
>     > Fix a buffer overrun issue spotted by coverity while accessing
>     > the array ulp_device_params.
> 
>     If it is spotted by coverity, is there a coverity issue id?
> 
> Yes. But in an internal scan.
> I haven't seen anything reported in this area in the latest coverity report
> against 20.05-rc1.

Thanks for checking, I wonder what is the difference so that it is not in public
converity.
Can you please mention in commit log that it is internal coverity, to prevent
same confusion later?

> 
> 
>     >
>     > Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")
>     >
>     > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com
>     <mailto:kishore.padmanabha@broadcom.com>>
>     > Reviewed-by: Michael Baucom <michael.baucom@broadcom.com
>     <mailto:michael.baucom@broadcom.com>>
>     > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com
>     <mailto:ajit.khaparde@broadcom.com>>
>     > ---
>     >  drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
>     >  1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
>     b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
>     > index 86384169f..e89aefad4 100644
>     > --- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
>     > +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
>     > @@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = {
>     >       }
>     >  };
>     > 
>     > -struct bnxt_ulp_device_params ulp_device_params[] = {
>     > +struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
>     >       [BNXT_ULP_DEVICE_ID_WH_PLUS] = {
>     >               .global_fid_enable       = BNXT_ULP_SYM_YES,
>     >               .byte_order              = (enum bnxt_ulp_byte_order)
>     >
> 


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

* [dpdk-dev] [PATCH v2 0/2] fix coverity reported issues
  2020-05-05 19:17 [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
                   ` (2 preceding siblings ...)
  2020-05-06  1:40 ` [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
@ 2020-05-07  3:11 ` Ajit Khaparde
  2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
  2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
  3 siblings, 2 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-07  3:11 UTC (permalink / raw)
  To: dev

Fix issues reported by Coverity.
Note that one issue addressed by patch [1/2] was reported in
internal coverity scan.

v1->v2: mention that one of the issue was reported in internal scan.

Ajit Khaparde (1):
  net/bnxt: fix uninitialized variable error

Kishore Padmanabha (1):
  net/bnxt: fix overrun of the ulp device params array

 drivers/net/bnxt/tf_core/tf_tbl.c         | 2 +-
 drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.1 (Apple Git-122.3)


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

* [dpdk-dev] [PATCH v2 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-07  3:11 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
@ 2020-05-07  3:11   ` Ajit Khaparde
  2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
  1 sibling, 0 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-07  3:11 UTC (permalink / raw)
  To: dev; +Cc: Kishore Padmanabha, Michael Baucom

From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

Fix a buffer overrun issue spotted by coverity while accessing
the array ulp_device_params.
Note that the issue was observed in an internal Coverity scan.

Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
index 86384169f..e89aefad4 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
@@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info ulp_def_ident_tbl[] = {
 	}
 };
 
-struct bnxt_ulp_device_params ulp_device_params[] = {
+struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
 	[BNXT_ULP_DEVICE_ID_WH_PLUS] = {
 		.global_fid_enable       = BNXT_ULP_SYM_YES,
 		.byte_order              = (enum bnxt_ulp_byte_order)
-- 
2.21.1 (Apple Git-122.3)


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

* [dpdk-dev] [PATCH v2 2/2] net/bnxt: fix uninitialized variable error
  2020-05-07  3:11 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
  2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
@ 2020-05-07  3:11   ` Ajit Khaparde
  1 sibling, 0 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-07  3:11 UTC (permalink / raw)
  To: dev; +Cc: Somnath Kotur, Randy Schacher

Fix uninitialized variable error reported by coverity.

Fixes: d33b68154fa4 ("net/bnxt: add tf_core table scope support")
Coverity issue: 357771

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_tbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c
index 93f387e86..d900c9c09 100644
--- a/drivers/net/bnxt/tf_core/tf_tbl.c
+++ b/drivers/net/bnxt/tf_core/tf_tbl.c
@@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
 {
 	struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
 	struct tf_em_table *tbl;
-	int rc;
+	int rc = 0;
 	int i;
 
 	for (i = KEY0_TABLE; i < MAX_TABLE; i++) {
-- 
2.21.1 (Apple Git-122.3)


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

* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array
  2020-05-07  0:09       ` Ferruh Yigit
@ 2020-05-07  3:14         ` Ajit Khaparde
  0 siblings, 0 replies; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-07  3:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk-dev, Kishore Padmanabha, Michael Baucom, John McNamara

On Wed, May 6, 2020 at 5:09 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 5/6/2020 11:14 PM, Ajit Khaparde wrote:
> >
> >
> > On Wed, May 6, 2020 at 2:17 AM Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
> >     > From: Kishore Padmanabha <kishore.padmanabha@broadcom.com
> >     <mailto:kishore.padmanabha@broadcom.com>>
> >     >
> >     > Fix a buffer overrun issue spotted by coverity while accessing
> >     > the array ulp_device_params.
> >
> >     If it is spotted by coverity, is there a coverity issue id?
> >
> > Yes. But in an internal scan.
> > I haven't seen anything reported in this area in the latest coverity
> report
> > against 20.05-rc1.
>
> Thanks for checking, I wonder what is the difference so that it is not in
> public
> converity.
> Can you please mention in commit log that it is internal coverity, to
> prevent
> same confusion later?
>
Done. Sent a v2 as well.


>
> >
> >
> >     >
> >     > Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")
> >     >
> >     > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com
> >     <mailto:kishore.padmanabha@broadcom.com>>
> >     > Reviewed-by: Michael Baucom <michael.baucom@broadcom.com
> >     <mailto:michael.baucom@broadcom.com>>
> >     > Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com
> >     <mailto:ajit.khaparde@broadcom.com>>
> >     > ---
> >     >  drivers/net/bnxt/tf_ulp/ulp_template_db.c | 2 +-
> >     >  1 file changed, 1 insertion(+), 1 deletion(-)
> >     >
> >     > diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> >     b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> >     > index 86384169f..e89aefad4 100644
> >     > --- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> >     > +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
> >     > @@ -321,7 +321,7 @@ struct bnxt_ulp_def_ident_info
> ulp_def_ident_tbl[] = {
> >     >       }
> >     >  };
> >     >
> >     > -struct bnxt_ulp_device_params ulp_device_params[] = {
> >     > +struct bnxt_ulp_device_params
> ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
> >     >       [BNXT_ULP_DEVICE_ID_WH_PLUS] = {
> >     >               .global_fid_enable       = BNXT_ULP_SYM_YES,
> >     >               .byte_order              = (enum bnxt_ulp_byte_order)
> >     >
> >
>
>

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

* Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error
  2020-05-06  9:13   ` Ferruh Yigit
@ 2020-05-07 18:55     ` Ajit Khaparde
  2020-05-07 21:15       ` Ferruh Yigit
  0 siblings, 1 reply; 14+ messages in thread
From: Ajit Khaparde @ 2020-05-07 18:55 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk-dev, Somnath Kotur, Randy Schacher

On Wed, May 6, 2020 at 2:14 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
> > Fix uninitialized variable error reported by coverity.
> >
> > Fixes: d33b68154fa4 ("net/bnxt: add tf_core table scope support")
>
> The commit id and the patch title doesn't exist in next-net (also not int
> next-net-brcm), I guess you mean [1] but the updated function below
> ('tf_em_ctx_reg()') even not exist in that commit.
>
> Can you please check the tag again?
>
> [1] net/bnxt: support TruFlow core table scope
>
Yes [1] is the correct commit.
dba3ca8b304f ("net/bnxt: support TruFlow core table scope").


>
> > Coverity issue: 357771
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> > Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
> > ---
> >  drivers/net/bnxt/tf_core/tf_tbl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c
> b/drivers/net/bnxt/tf_core/tf_tbl.c
> > index 93f387e86..d900c9c09 100644
> > --- a/drivers/net/bnxt/tf_core/tf_tbl.c
> > +++ b/drivers/net/bnxt/tf_core/tf_tbl.c
> > @@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
> >  {
> >       struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
> >       struct tf_em_table *tbl;
> > -     int rc;
> > +     int rc = 0;
> >       int i;
> >
> >       for (i = KEY0_TABLE; i < MAX_TABLE; i++) {
> >
>
>

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

* Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error
  2020-05-07 18:55     ` Ajit Khaparde
@ 2020-05-07 21:15       ` Ferruh Yigit
  0 siblings, 0 replies; 14+ messages in thread
From: Ferruh Yigit @ 2020-05-07 21:15 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk-dev, Somnath Kotur, Randy Schacher

On 5/7/2020 7:55 PM, Ajit Khaparde wrote:
> 
> 
> On Wed, May 6, 2020 at 2:14 AM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 5/5/2020 8:17 PM, Ajit Khaparde wrote:
>     > Fix uninitialized variable error reported by coverity.
>     >
>     > Fixes: d33b68154fa4 ("net/bnxt: add tf_core table scope support")
> 
>     The commit id and the patch title doesn't exist in next-net (also not int
>     next-net-brcm), I guess you mean [1] but the updated function below
>     ('tf_em_ctx_reg()') even not exist in that commit.
> 
>     Can you please check the tag again?
> 
>     [1] net/bnxt: support TruFlow core table scope
> 
> Yes [1] is the correct commit.
> dba3ca8b304f("net/bnxt: support TruFlow core table scope").

Using following after offline discussion:
Fixes: 69c410b8448d ("net/bnxt: support EM/EEM")

>  
> 
> 
>     > Coverity issue: 357771
>     >
>     > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com
>     <mailto:ajit.khaparde@broadcom.com>>
>     > Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com
>     <mailto:somnath.kotur@broadcom.com>>
>     > Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com
>     <mailto:stuart.schacher@broadcom.com>>
>     > ---
>     >  drivers/net/bnxt/tf_core/tf_tbl.c | 2 +-
>     >  1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/drivers/net/bnxt/tf_core/tf_tbl.c
>     b/drivers/net/bnxt/tf_core/tf_tbl.c
>     > index 93f387e86..d900c9c09 100644
>     > --- a/drivers/net/bnxt/tf_core/tf_tbl.c
>     > +++ b/drivers/net/bnxt/tf_core/tf_tbl.c
>     > @@ -539,7 +539,7 @@ tf_em_ctx_reg(struct tf *tfp,
>     >  {
>     >       struct tf_em_ctx_mem_info *ctxp = &tbl_scope_cb->em_ctx_info[dir];
>     >       struct tf_em_table *tbl;
>     > -     int rc;
>     > +     int rc = 0;
>     >       int i;
>     > 
>     >       for (i = KEY0_TABLE; i < MAX_TABLE; i++) {
>     >
> 


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

end of thread, other threads:[~2020-05-07 21:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 19:17 [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
2020-05-05 19:17 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
2020-05-06  9:17   ` Ferruh Yigit
2020-05-06 22:14     ` Ajit Khaparde
2020-05-07  0:09       ` Ferruh Yigit
2020-05-07  3:14         ` Ajit Khaparde
2020-05-05 19:17 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde
2020-05-06  9:13   ` Ferruh Yigit
2020-05-07 18:55     ` Ajit Khaparde
2020-05-07 21:15       ` Ferruh Yigit
2020-05-06  1:40 ` [dpdk-dev] [PATCH 0/2] fix coverity reported issues Ajit Khaparde
2020-05-07  3:11 ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 1/2] net/bnxt: fix overrun of the ulp device params array Ajit Khaparde
2020-05-07  3:11   ` [dpdk-dev] [PATCH v2 2/2] net/bnxt: fix uninitialized variable error Ajit Khaparde

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).