netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE
@ 2020-06-25 16:45 Colin King
  2020-06-25 17:00 ` [EXT] " Igor Russkikh
  2020-06-25 19:48 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-06-25 16:45 UTC (permalink / raw)
  To: Ariel Elior, GR-everest-linux-l2, David S . Miller,
	Jakub Kicinski, Michal Kalderon, netdev
  Cc: kernel-janitors, linux-kernel, Igor Russkikh

From: Colin Ian King <colin.king@canonical.com>

The error DBG_STATUS_NO_MATCHING_FRAMING_MODE was added to the enum
enum dbg_status however there is a missing corresponding entry for
this in the array s_status_str. This causes an out-of-bounds read when
indexing into the last entry of s_status_str.  Fix this by adding in
the missing entry.

Addresses-Coverity: ("Out-of-bounds read").
Fixes: 2d22bc8354b1 ("qed: FW 8.42.2.0 debug features")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---

V2: use the error message as suggested by Igor Russkikh

---
 drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c
index 57a0dab88431..d9dfaf214f6b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_debug.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c
@@ -5569,6 +5569,8 @@ static const char * const s_status_str[] = {
 	/* DBG_STATUS_INVALID_FILTER_TRIGGER_DWORDS */
 	"The filter/trigger constraint dword offsets are not enabled for recording",
 
+	/* DBG_STATUS_NO_MATCHING_FRAMING_MODE */
+	"No matching framing mode found for the enabled blocks/Storms - use less dwords for blocks data",
 
 	/* DBG_STATUS_VFC_READ_ERROR */
 	"Error reading from VFC",
-- 
2.27.0


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

* Re: [EXT] [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE
  2020-06-25 16:45 [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE Colin King
@ 2020-06-25 17:00 ` Igor Russkikh
  2020-06-25 19:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Russkikh @ 2020-06-25 17:00 UTC (permalink / raw)
  To: Colin King, Ariel Elior, GR-everest-linux-l2, David S . Miller,
	Jakub Kicinski, Michal Kalderon, netdev
  Cc: kernel-janitors, linux-kernel



On 25/06/2020 7:45 pm, Colin King wrote:
> External Email
> 
> ----------------------------------------------------------------------
> From: Colin Ian King <colin.king@canonical.com>
> 
> The error DBG_STATUS_NO_MATCHING_FRAMING_MODE was added to the enum
> enum dbg_status however there is a missing corresponding entry for
> this in the array s_status_str. This causes an out-of-bounds read when
> indexing into the last entry of s_status_str.  Fix this by adding in
> the missing entry.
> 
> Addresses-Coverity: ("Out-of-bounds read").
> Fixes: 2d22bc8354b1 ("qed: FW 8.42.2.0 debug features")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 
> V2: use the error message as suggested by Igor Russkikh
> 
> ---

Thanks!

Acked-by: Igor Russkikh <irusskikh@marvell.com>



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

* Re: [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE
  2020-06-25 16:45 [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE Colin King
  2020-06-25 17:00 ` [EXT] " Igor Russkikh
@ 2020-06-25 19:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-06-25 19:48 UTC (permalink / raw)
  To: colin.king
  Cc: aelior, GR-everest-linux-l2, kuba, michal.kalderon, netdev,
	kernel-janitors, linux-kernel, irusskikh

From: Colin King <colin.king@canonical.com>
Date: Thu, 25 Jun 2020 17:45:05 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The error DBG_STATUS_NO_MATCHING_FRAMING_MODE was added to the enum
> enum dbg_status however there is a missing corresponding entry for
> this in the array s_status_str. This causes an out-of-bounds read when
> indexing into the last entry of s_status_str.  Fix this by adding in
> the missing entry.
> 
> Addresses-Coverity: ("Out-of-bounds read").
> Fixes: 2d22bc8354b1 ("qed: FW 8.42.2.0 debug features")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 
> V2: use the error message as suggested by Igor Russkikh

I already applied your V1 so this patch no longer applies.

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

end of thread, other threads:[~2020-06-25 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 16:45 [PATCH][V2] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE Colin King
2020-06-25 17:00 ` [EXT] " Igor Russkikh
2020-06-25 19:48 ` David Miller

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