netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: michael.chan@broadcom.com
Cc: maheshb@google.com, edumazet@google.com, netdev@vger.kernel.org,
	dja@axtens.net
Subject: Re: [PATCH RFC] net: Validate size of non-TSO packets in validate_xmit_skb().
Date: Tue, 26 Feb 2019 13:16:58 -0800 (PST)	[thread overview]
Message-ID: <20190226.131658.663280846317438258.davem@davemloft.net> (raw)
In-Reply-To: <CACKFLim51U_NGEU9nH5ZPWiup==aDLQM+x3p_O0-3EerZQ74hg@mail.gmail.com>

From: Michael Chan <michael.chan@broadcom.com>
Date: Tue, 26 Feb 2019 10:22:42 -0800

> On Tue, Feb 26, 2019 at 9:13 AM David Miller <davem@davemloft.net> wrote:
>>
>> From: Michael Chan <michael.chan@broadcom.com>
>> Date: Tue, 26 Feb 2019 05:56:41 -0500
>>
>> > There have been reports of oversize UDP packets being sent to the
>> > driver to be transmitted, causing error conditions.  The issue is
>> > likely caused by the dst of the SKB switching between 'lo' with
>> > 64K MTU and the hardware device with a smaller MTU.  Patches are
>> > being proposed by Mahesh Bandewar <maheshb@google.com> to fix the
>> > issue.
>> >
>> > Separately, we should add a length check in validate_xmit_skb()
>> > to drop these oversize packets before they reach the driver.
>> > This patch only validates non-TSO packets.  Complete validation
>> > of segmented TSO packet size will probably be too slow.
>> >
>> > Signed-off-by: Michael Chan <michael.chan@broadcom.com>
>>
>> Anything which changes the dst of an SKB really is responsible for
>> fixing up whatever became "incompatible" in the new path.
>>
>> So like Eric I want to see this out of the fast path.
> 
> Ok.  In the meantime, will you take a 2-line bnxt_en patch that will
> prevent this issue in kernel 5.0?

Sure, but we will have to remember to remove it when it is no longer
necessary...

      reply	other threads:[~2019-02-26 21:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 10:56 [PATCH RFC] net: Validate size of non-TSO packets in validate_xmit_skb() Michael Chan
2019-02-26 15:16 ` Eric Dumazet
2019-02-26 17:13 ` David Miller
2019-02-26 18:22   ` Michael Chan
2019-02-26 21:16     ` David Miller [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=20190226.131658.663280846317438258.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dja@axtens.net \
    --cc=edumazet@google.com \
    --cc=maheshb@google.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).