netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver
@ 2024-06-25 17:33 Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

This patchset fixes minor klockwork issues in multiple files in AF driver

Patch #1: octeontx2-af: Fix klockwork issue in cgx.c

Patch #2: octeontx2-af: Fix klockwork issues in mcs_rvu_if.c

Patch #3: octeontx2-af: Fixes klockwork issues in ptp.c

Patch #4: octeontx2-af: Fixes klockwork issues in rvu_cpt.c

Patch #5: octeontx2-af: Fixes klockwork issues in rvu_debugfs.c

Patch #6: octeontx2-af: Fix klockwork issue in rvu_nix.c

Patch #7: octeontx2-af: Fix klockwork issue in rvu_npc.c

Suman Ghosh (7):
  octeontx2-af: Fix klockwork issue in cgx.c
  octeontx2-af: Fix klockwork issue in mcs_rvu_if.c
  octeontx2-af: Fixes klockwork issues in ptp.c
  octeontx2-af: Fixes klockwork issues in rvu_cpt.c
  octeontx2-af: Fixes klockwork issues in rvu_debugfs.c
  octeontx2-af: Fix klockwork issue in rvu_nix.c
  octeontx2-af: Fix klockwork issue in rvu_npc.c

v2 changes:
  - Updated description for all the patchsets to address comment from Markus
  - Removed variable initialization from cgx.c(patch #1) to avoid fix of different
    klockwork issues

 drivers/net/ethernet/marvell/octeontx2/af/cgx.c       |  7 +++++++
 .../net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c    |  6 ++++--
 drivers/net/ethernet/marvell/octeontx2/af/ptp.c       | 11 ++++++++++-
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c   |  2 +-
 .../net/ethernet/marvell/octeontx2/af/rvu_debugfs.c   |  8 +++++++-
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c   |  2 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c   |  1 +
 7 files changed, 31 insertions(+), 6 deletions(-)

-- 
2.25.1


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

* [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-26  1:04   ` Jakub Kicinski
  2024-06-25 17:33 ` [net PATCH v2 2/7] octeontx2-af: Fix klockwork issue in mcs_rvu_if.c Suman Ghosh
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

Variable "cgx_dev" and "lmac" was getting accessed without NULL checks
which can lead to pointer exception in some erroneous scenarios.
This patch fixes the same by adding the required NULL checks.

Fixes: 96be2e0da85e ("octeontx2-af: Support for MAC address filters in CGX")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 27935c54b91b..e5e266608cfc 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -465,6 +465,13 @@ u64 cgx_lmac_addr_get(u8 cgx_id, u8 lmac_id)
 	u64 cfg;
 	int id;
 
+	if (!cgx_dev)
+		return 0;
+
+	lmac = lmac_pdata(lmac_id, cgx_dev);
+	if (!lmac)
+		return 0;
+
 	mac_ops = cgx_dev->mac_ops;
 
 	id = get_sequence_id_of_lmac(cgx_dev, lmac_id);
-- 
2.25.1


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

* [net PATCH v2 2/7] octeontx2-af: Fix klockwork issue in mcs_rvu_if.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 17:33 ` [net PATCH 2/7] octeontx2-af: Fix klockwork issues " Suman Ghosh
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

There was a missing "default" condtion in a mailbox switch case, which
can lead to wrong response message to the caller. This patch fixes the
same by adding gracefull exit for a "default" switch case scenario.

Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index d39d86e694cc..de4482dee86a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -681,7 +681,7 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 	u16 pcifunc = req->hdr.pcifunc;
 	struct mcs_rsrc_map *map;
 	struct mcs *mcs;
-	int rsrc_id, i;
+	int rsrc_id = -EINVAL, i;
 
 	if (req->mcs_id >= rvu->mcs_blk_cnt)
 		return MCS_AF_ERR_INVALID_MCSID;
@@ -742,6 +742,8 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 			rsp->rsrc_cnt++;
 		}
 		break;
+	default:
+		goto exit;
 	}
 
 	rsp->rsrc_type = req->rsrc_type;
@@ -854,7 +856,7 @@ int rvu_mbox_handler_mcs_ctrl_pkt_rule_write(struct rvu *rvu,
 static void rvu_mcs_set_lmac_bmap(struct rvu *rvu)
 {
 	struct mcs *mcs = mcs_get_pdata(0);
-	unsigned long lmac_bmap;
+	unsigned long lmac_bmap = 0;
 	int cgx, lmac, port;
 
 	for (port = 0; port < mcs->hw->lmac_cnt; port++) {
-- 
2.25.1


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

* [net PATCH 2/7] octeontx2-af: Fix klockwork issues in mcs_rvu_if.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 2/7] octeontx2-af: Fix klockwork issue in mcs_rvu_if.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 18:37   ` Markus Elfring
  2024-06-25 17:33 ` [net PATCH v2 3/7] octeontx2-af: Fixes klockwork issues in ptp.c Suman Ghosh
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

These are not real issues but sanity checks.

Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index d39d86e694cc..de4482dee86a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -681,7 +681,7 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 	u16 pcifunc = req->hdr.pcifunc;
 	struct mcs_rsrc_map *map;
 	struct mcs *mcs;
-	int rsrc_id, i;
+	int rsrc_id = -EINVAL, i;
 
 	if (req->mcs_id >= rvu->mcs_blk_cnt)
 		return MCS_AF_ERR_INVALID_MCSID;
@@ -742,6 +742,8 @@ int rvu_mbox_handler_mcs_alloc_resources(struct rvu *rvu,
 			rsp->rsrc_cnt++;
 		}
 		break;
+	default:
+		goto exit;
 	}
 
 	rsp->rsrc_type = req->rsrc_type;
@@ -854,7 +856,7 @@ int rvu_mbox_handler_mcs_ctrl_pkt_rule_write(struct rvu *rvu,
 static void rvu_mcs_set_lmac_bmap(struct rvu *rvu)
 {
 	struct mcs *mcs = mcs_get_pdata(0);
-	unsigned long lmac_bmap;
+	unsigned long lmac_bmap = 0;
 	int cgx, lmac, port;
 
 	for (port = 0; port < mcs->hw->lmac_cnt; port++) {
-- 
2.25.1


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

* [net PATCH v2 3/7] octeontx2-af: Fixes klockwork issues in ptp.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (2 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH 2/7] octeontx2-af: Fix klockwork issues " Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 4/7] octeontx2-af: Fixes klockwork issues in rvu_cpt.c Suman Ghosh
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

Some variable was getting accessed without NULL checks
which can lead to pointer exception in some erroneous scenarios.
This patch fixes the same by adding the required NULL checks.

Fixes: 4086f2a06a35 ("octeontx2-af: Add support for Marvell PTP coprocessor")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/ptp.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
index bcc96eed2481..0be5d22d213b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
@@ -517,6 +517,7 @@ static int ptp_pps_on(struct ptp *ptp, int on, u64 period)
 static int ptp_probe(struct pci_dev *pdev,
 		     const struct pci_device_id *ent)
 {
+	void __iomem * const *base;
 	struct ptp *ptp;
 	int err;
 
@@ -536,7 +537,15 @@ static int ptp_probe(struct pci_dev *pdev,
 	if (err)
 		goto error_free;
 
-	ptp->reg_base = pcim_iomap_table(pdev)[PCI_PTP_BAR_NO];
+	base = pcim_iomap_table(pdev);
+	if (!base)
+		goto error_free;
+
+	ptp->reg_base = base[PCI_PTP_BAR_NO];
+	if (!ptp->reg_base) {
+		err = -ENODEV;
+		goto error_free;
+	}
 
 	pci_set_drvdata(pdev, ptp);
 	if (!first_ptp_block)
-- 
2.25.1


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

* [net PATCH v2 4/7] octeontx2-af: Fixes klockwork issues in rvu_cpt.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (3 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH v2 3/7] octeontx2-af: Fixes klockwork issues in ptp.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 5/7] octeontx2-af: Fixes klockwork issues in rvu_debugfs.c Suman Ghosh
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

Added initialization of a local variable to avoid junk values if it is
used before set.

Fixes: 4826090719d4 ("octeontx2-af: Enable CPT HW interrupts")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
index f047185f38e0..a1a919fcda47 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
@@ -43,7 +43,7 @@ static irqreturn_t cpt_af_flt_intr_handler(int vec, void *ptr)
 	struct rvu *rvu = block->rvu;
 	int blkaddr = block->addr;
 	u64 reg, val;
-	int i, eng;
+	int i, eng = 0;
 	u8 grp;
 
 	reg = rvu_read64(rvu, blkaddr, CPT_AF_FLTX_INT(vec));
-- 
2.25.1


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

* [net PATCH v2 5/7] octeontx2-af: Fixes klockwork issues in rvu_debugfs.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (4 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH v2 4/7] octeontx2-af: Fixes klockwork issues in rvu_cpt.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 6/7] octeontx2-af: Fix klockwork issue in rvu_nix.c Suman Ghosh
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

As part of this fix, fixed sized char array is converted to dynamic sized
array to avoid splitting of some debug information.

Fixes: d06c2aba5163 ("octeontx2-af: cn10k: mcs: Add debugfs support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index 881d704644fb..292eead7be46 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -518,13 +518,17 @@ RVU_DEBUG_SEQ_FOPS(mcs_rx_secy_stats, mcs_rx_secy_stats_display, NULL);
 
 static void rvu_dbg_mcs_init(struct rvu *rvu)
 {
+	char *dname = NULL;
 	struct mcs *mcs;
-	char dname[10];
 	int i;
 
 	if (!rvu->mcs_blk_cnt)
 		return;
 
+	dname = kmalloc_array(rvu->mcs_blk_cnt, sizeof(char), GFP_KERNEL);
+	if (!dname)
+		return;
+
 	rvu->rvu_dbg.mcs_root = debugfs_create_dir("mcs", rvu->rvu_dbg.root);
 
 	for (i = 0; i < rvu->mcs_blk_cnt; i++) {
@@ -568,6 +572,8 @@ static void rvu_dbg_mcs_init(struct rvu *rvu)
 		debugfs_create_file("port", 0600, rvu->rvu_dbg.mcs_tx, mcs,
 				    &rvu_dbg_mcs_tx_port_stats_fops);
 	}
+
+	kfree(dname);
 }
 
 #define LMT_MAPTBL_ENTRY_SIZE 16
-- 
2.25.1


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

* [net PATCH v2 6/7] octeontx2-af: Fix klockwork issue in rvu_nix.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (5 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH v2 5/7] octeontx2-af: Fixes klockwork issues in rvu_debugfs.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 17:33 ` [net PATCH v2 7/7] octeontx2-af: Fix klockwork issue in rvu_npc.c Suman Ghosh
  2024-06-25 18:17 ` [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Markus Elfring
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

Added initialization of a local variable to avoid junk values if it is
used before set.

Fixes: 4b5a3ab17c6c ("octeontx2-af: Hardware configuration for inline IPsec")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 00af8888e329..0c59295eaf9d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -5375,7 +5375,7 @@ static void nix_inline_ipsec_cfg(struct rvu *rvu, struct nix_inline_ipsec_cfg *r
 				 int blkaddr)
 {
 	u8 cpt_idx, cpt_blkaddr;
-	u64 val;
+	u64 val = 0;
 
 	cpt_idx = (blkaddr == BLKADDR_NIX0) ? 0 : 1;
 	if (req->enable) {
-- 
2.25.1


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

* [net PATCH v2 7/7] octeontx2-af: Fix klockwork issue in rvu_npc.c
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (6 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH v2 6/7] octeontx2-af: Fix klockwork issue in rvu_nix.c Suman Ghosh
@ 2024-06-25 17:33 ` Suman Ghosh
  2024-06-25 18:17 ` [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Markus Elfring
  8 siblings, 0 replies; 14+ messages in thread
From: Suman Ghosh @ 2024-06-25 17:33 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring
  Cc: Suman Ghosh

Set the pointer value to NULL after freeing to avoid wrong access.

Fixes: 5d16250b6059 ("octeontx2-af: load NPC profile via firmware database")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
index 97722ce8c4cb..a69438921a8e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
@@ -1765,6 +1765,7 @@ static void npc_load_kpu_profile(struct rvu *rvu)
 				rvu->kpu_prfl_addr = NULL;
 			} else {
 				kfree(rvu->kpu_fwdata);
+				rvu->kpu_fwdata = NULL;
 			}
 			rvu->kpu_fwdata = NULL;
 			rvu->kpu_fwdata_sz = 0;
-- 
2.25.1


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

* Re: [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver
  2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
                   ` (7 preceding siblings ...)
  2024-06-25 17:33 ` [net PATCH v2 7/7] octeontx2-af: Fix klockwork issue in rvu_npc.c Suman Ghosh
@ 2024-06-25 18:17 ` Markus Elfring
       [not found]   ` <SJ0PR18MB52166806AA7FB13ED3DC3E39DBD52@SJ0PR18MB5216.namprd18.prod.outlook.com>
  8 siblings, 1 reply; 14+ messages in thread
From: Markus Elfring @ 2024-06-25 18:17 UTC (permalink / raw)
  To: Suman Ghosh, netdev
  Cc: LKML, David S. Miller, Jakub Kicinski, Jerin Jacob, Eric Dumazet,
	Geethasowjanya Akula, Hariprasad Kelam, Linu Cherian, Paolo Abeni,
	Subbaraya Sundeep Bhatta, Sunil Goutham

…
>   octeontx2-af: Fix klockwork issue in rvu_npc.c
>
> v2 changes:
>   - Updated description for all the patchsets to address comment from Markus
…

* Why did you not directly respond to the recurring patch review concern
  about better summary phrases (or message subjects)?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc5#n646

* Would you like to explain any more here which development concern categories
  were picked up from the mentioned source code analysis tool?

* How much do you care for the grouping of logical changes into
  consistent patch series?


Regards,
Markus

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

* Re: [net PATCH 2/7] octeontx2-af: Fix klockwork issues in mcs_rvu_if.c
  2024-06-25 17:33 ` [net PATCH 2/7] octeontx2-af: Fix klockwork issues " Suman Ghosh
@ 2024-06-25 18:37   ` Markus Elfring
  0 siblings, 0 replies; 14+ messages in thread
From: Markus Elfring @ 2024-06-25 18:37 UTC (permalink / raw)
  To: Suman Ghosh, netdev
  Cc: LKML, David S. Miller, Jakub Kicinski, Jerin Jacob, Eric Dumazet,
	Geethasowjanya Akula, Hariprasad Kelam, Linu Cherian, Paolo Abeni,
	Subbaraya Sundeep Bhatta, Sunil Goutham

> These are not real issues but sanity checks.
…

* Did the mentioned source code analysis tool present more detailed reports
  and special development views?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc5#n45

* You accidentally overlooked to specify a corresponding version identification
  in the message subject, didn't you?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc5#n668


Regards,
Markus

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

* Re: [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver
       [not found]   ` <SJ0PR18MB52166806AA7FB13ED3DC3E39DBD52@SJ0PR18MB5216.namprd18.prod.outlook.com>
@ 2024-06-25 19:50     ` Markus Elfring
  2024-06-26  1:04     ` [EXTERNAL] " Jakub Kicinski
  1 sibling, 0 replies; 14+ messages in thread
From: Markus Elfring @ 2024-06-25 19:50 UTC (permalink / raw)
  To: Suman Ghosh, netdev
  Cc: LKML, David S. Miller, Jakub Kicinski, Jerin Jacob, Eric Dumazet,
	Geethasowjanya Akula, Hariprasad Kelam, Linu Cherian, Paolo Abeni,
	Subbaraya Sundeep Bhatta, Sunil Kovvuri Goutham

> > * Why did you not directly respond to the recurring patch review concern
> >   about better summary phrases (or message subjects)?
> [Suman] I thought the “summery phrase” is per patch.

Summaries are obviously important parts for patch subjects.


> The cover letter is mentioning the reason for the change

I would like to read an improved overview for your change approach.


> and each patch set is adding the summery for the change.

I have got understanding difficulties for such information somehow.


> Since it is not some actual ‘fix’ I am not sure what more to add other

It seems that there is a temporary conflict according to expected explanation quality.


> than mentioning klockwork fixes.

Source code analysis tools can provide more helpful information.
Do I need to remind you for the published software documentation
around “C checkers”?


> I am not sure what more can be added for a variable initialization to zero
> or adding a NULL check.

* Common vulnerability enumeration?

* CERT reference?


> Can you suggest some?

* Please take another look at linked information sources.

* Can you get sufficient inspirations from published patches?


> > * Would you like to explain any more here which development concern categories
> >   were picked up from the mentioned source code analysis tool?
>
> [Suman]  Development concerns are mentioned in individual patch sets.

* Grouping?

* Outlines?

* Taxonomy?


> > * How much do you care for the grouping of logical changes into
> >   consistent patch series?
>
> [Suman] I thought about it but then I was not sure
>         how to add fix tags for a unified patch set.

Why did you not ask before sending another questionable patch series?


> Hence went with per file approach.

It can occasionally be helpful for change preparations.


> Do you see any problem with the approach?

Obviously, yes.

I hope that you can take several patch review issues better into account finally.

Regards,
Markus

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

* Re: [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c
  2024-06-25 17:33 ` [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
@ 2024-06-26  1:04   ` Jakub Kicinski
  0 siblings, 0 replies; 14+ messages in thread
From: Jakub Kicinski @ 2024-06-26  1:04 UTC (permalink / raw)
  To: Suman Ghosh
  Cc: sgoutham, gakula, sbhatta, hkelam, davem, edumazet, pabeni,
	netdev, linux-kernel, lcherian, jerinj, markus.elfring

On Tue, 25 Jun 2024 23:03:43 +0530 Suman Ghosh wrote:
> Variable "cgx_dev" and "lmac" was getting accessed without NULL checks
> which can lead to pointer exception in some erroneous scenarios.
> This patch fixes the same by adding the required NULL checks.

Please remove the name of the tool from the subject, too.

You can add something like:

Addresses klockwork warning ${the warning generated or such}

at the end of the commit message.

If there's a path which can lead to a crash please describe it.
If there's no real issue, it's not a fix (no Fixes and net-next).

But really, we tend to avoid addressing issues just to please
overzealous static code analysis tools. And we advise against
defensive programming, so please make sure the patches actually 
make sense. I don't think patch 6 does, picking a random one to check..

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

* Re: [EXTERNAL] Re: [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver
       [not found]   ` <SJ0PR18MB52166806AA7FB13ED3DC3E39DBD52@SJ0PR18MB5216.namprd18.prod.outlook.com>
  2024-06-25 19:50     ` Markus Elfring
@ 2024-06-26  1:04     ` Jakub Kicinski
  1 sibling, 0 replies; 14+ messages in thread
From: Jakub Kicinski @ 2024-06-26  1:04 UTC (permalink / raw)
  To: Suman Ghosh
  Cc: Markus Elfring, netdev@vger.kernel.org, LKML, David S. Miller,
	Jerin Jacob, Eric Dumazet, Geethasowjanya Akula, Hariprasad Kelam,
	Linu Cherian, Paolo Abeni, Subbaraya Sundeep Bhatta,
	Sunil Kovvuri Goutham

On Tue, 25 Jun 2024 18:34:55 +0000 Suman Ghosh wrote:
> * Why did you not directly respond to the recurring patch review concern
> 
>   about better summary phrases (or message subjects)?
> 
>   https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_torvalds_linux.git_tree_Documentation_process_submitting-2Dpatches.rst-3Fh-3Dv6.10-2Drc5-23n646&d=DwIFaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=7si3Xn9Ly-Se1a655kvEPIYU0nQ9HPeN280sEUv5ROU&m=tyo7VgAvJ4PW3onftljYvIjrznQ9gYDoeBImOruW9-jUya4QuUMNK2qYOPd2dJK3&s=wYjJjR6jScQdlXWCRWzeG3SidVq0MRYYjMlDPBGMJI8&e=
> 
> [Suman] I thought the “summery phrase” is per patch. The cover letter is mentioning the reason for the change and each patch set is adding the summery for the change. Since it is not some actual ‘fix’ I am not sure what more to add other than mentioning klockwork fixes. I am not sure what more can be added for a variable initialization to zero or adding a NULL check. Can you suggest some?
> 
> 
> 
> * Would you like to explain any more here which development concern categories
> 
>   were picked up from the mentioned source code analysis tool?
> 
> [Suman]  Development concerns are mentioned in individual patch sets. Having junk value in the variable if not initialized or accessing a NULL pointer, etc.
> 
> 
> 
> * How much do you care for the grouping of logical changes into
> 
>   consistent patch series?
> 
> [Suman] I thought about it but then I was not sure how to add fix tags for a unified patch set. Hence went with per file approach. Do you see any problem with the approach?

Please configure your MUA to quote correctly, with > characters.

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

end of thread, other threads:[~2024-06-26  1:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 17:33 [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Suman Ghosh
2024-06-25 17:33 ` [net PATCH v2 1/7] octeontx2-af: Fix klockwork issue in cgx.c Suman Ghosh
2024-06-26  1:04   ` Jakub Kicinski
2024-06-25 17:33 ` [net PATCH v2 2/7] octeontx2-af: Fix klockwork issue in mcs_rvu_if.c Suman Ghosh
2024-06-25 17:33 ` [net PATCH 2/7] octeontx2-af: Fix klockwork issues " Suman Ghosh
2024-06-25 18:37   ` Markus Elfring
2024-06-25 17:33 ` [net PATCH v2 3/7] octeontx2-af: Fixes klockwork issues in ptp.c Suman Ghosh
2024-06-25 17:33 ` [net PATCH v2 4/7] octeontx2-af: Fixes klockwork issues in rvu_cpt.c Suman Ghosh
2024-06-25 17:33 ` [net PATCH v2 5/7] octeontx2-af: Fixes klockwork issues in rvu_debugfs.c Suman Ghosh
2024-06-25 17:33 ` [net PATCH v2 6/7] octeontx2-af: Fix klockwork issue in rvu_nix.c Suman Ghosh
2024-06-25 17:33 ` [net PATCH v2 7/7] octeontx2-af: Fix klockwork issue in rvu_npc.c Suman Ghosh
2024-06-25 18:17 ` [net PATCH v2 0/7] octeontx2-af: Fix klockwork issues in AF driver Markus Elfring
     [not found]   ` <SJ0PR18MB52166806AA7FB13ED3DC3E39DBD52@SJ0PR18MB5216.namprd18.prod.outlook.com>
2024-06-25 19:50     ` Markus Elfring
2024-06-26  1:04     ` [EXTERNAL] " Jakub Kicinski

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