public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Cc: pabeni@redhat.com, pavan.chebbi@broadcom.com,
	rahul-rg.gupta@broadcom.com, edumazet@google.com,
	ajit.khaparde@broadcom.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, vsrama-krishna.nemani@broadcom.com,
	andrew+netdev@lunn.ch, horms@kernel.org, davem@davemloft.net,
	michael.chan@broadcom.com, rajashekar.hudumula@broadcom.com,
	vikas.gupta@broadcom.com
Subject: Re: [v6,net-next,8/8] bng_en: Add support for TPA events
Date: Tue, 27 Jan 2026 10:47:15 -0800	[thread overview]
Message-ID: <20260127104715.7b552ad9@kernel.org> (raw)
In-Reply-To: <CANXQDtZr8-_hVARZyt9xZR-ej8fTZNc-pvg4r3fAPB1ActM2fw@mail.gmail.com>

On Tue, 27 Jan 2026 23:28:46 +0530 Bhargava Chenna Marreddy wrote:
> > The agg_arr is allocated with MAX_SKB_FRAGS entries, but there is no
> > bounds check before writing to it. The bnxt driver has a BUG_ON guard
> > at this location:
> >
> >     BUG_ON(tpa_info->agg_count >= MAX_SKB_FRAGS);
> >
> > Is there a reason this check was omitted? While the check in
> > bnge_tpa_end() catches agg_bufs > MAX_SKB_FRAGS, that happens after
> > the aggregation completions have already been stored. If hardware
> > misbehaves and sends more aggregation completions than expected, could
> > this overflow agg_arr[]?  
> 
> We didn't include the BUG_ON as per this discussion,
> https://lore.kernel.org/netdev/20251225125229.GL11869@unreal/

Oh, interesting. I couldn't find it in the patch I assumed it's out of
context. Sounds like AI has imagined it again :|

> We plan to address this HW misbehavior using a recovery mechanism in a
> follow-up patch series.
> Please let me know if you agree with this plan.

IIUC you're referring to issues like "leaking" the ID which is then
recovered by doing a TPA / queue reset. I'm fine with deferring that.
Simple bugs like potential OOB memory accesses have to be handled.

      reply	other threads:[~2026-01-27 18:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 19:34 [v6, net-next 0/8] bng_en: enhancements for RX and TX datapath Bhargava Marreddy
2026-01-23 19:34 ` [v6, net-next 1/8] bng_en: Extend bnge_set_ring_params() for rx-copybreak Bhargava Marreddy
2026-01-23 19:34 ` [v6, net-next 2/8] bng_en: Add RX support Bhargava Marreddy
2026-01-23 19:34 ` [v6, net-next 3/8] bng_en: Handle an HWRM completion request Bhargava Marreddy
2026-01-23 19:35 ` [v6, net-next 4/8] bng_en: Add TX support Bhargava Marreddy
2026-01-23 19:35 ` [v6, net-next 5/8] bng_en: Add ndo_features_check support Bhargava Marreddy
2026-01-23 19:35 ` [v6, net-next 6/8] bng_en: Add support to handle AGG events Bhargava Marreddy
2026-01-23 19:35 ` [v6, net-next 7/8] bng_en: Add TPA related functions Bhargava Marreddy
2026-01-23 19:35 ` [v6, net-next 8/8] bng_en: Add support for TPA events Bhargava Marreddy
2026-01-27  3:22   ` [v6,net-next,8/8] " Jakub Kicinski
2026-01-27 17:58     ` Bhargava Chenna Marreddy
2026-01-27 18:47       ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260127104715.7b552ad9@kernel.org \
    --to=kuba@kernel.org \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhargava.marreddy@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=rahul-rg.gupta@broadcom.com \
    --cc=rajashekar.hudumula@broadcom.com \
    --cc=vikas.gupta@broadcom.com \
    --cc=vsrama-krishna.nemani@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox