netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jasowang@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	mst@redhat.com, edumazet@google.com
Subject: Re: [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets
Date: Sun, 17 Mar 2013 12:10:26 -0400 (EDT)	[thread overview]
Message-ID: <20130317.121026.733329595817911776.davem@davemloft.net> (raw)
In-Reply-To: <1363333305-54398-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Fri, 15 Mar 2013 15:41:44 +0800

> Commit 1def9238d4aa2 (net_sched: more precise pkt_len computation) tries to do
> precise packet len computation for GSO packets, but it does not check whether
> the packets were from untrusted source. This is wrong since: we haven't done
> header check before so both gso_segs and headers may not be correct. So this
> patch just bypass the precise pkt_len computation for packet from untrusted
> source (SKB_GSO_DODGY).
> 
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>

I do not think this is appropriate or even necessary.

All the user can do by reporting an incorrect header size or GSO segs
is hurt himself, by making his traffic take more packet scheduler
quota.

When we do precise accounting, it increases, never decreases, the
amount that a packet "costs" as far as the packet scheduler is
concerned.

  parent reply	other threads:[~2013-03-17 16:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  7:41 [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets Jason Wang
2013-03-15  7:41 ` [PATCH net-next 2/2] net: reset transport header if it was not set before transmission Jason Wang
2013-03-16  2:10   ` Eric Dumazet
2013-03-17 16:13     ` David Miller
2013-03-19  9:26       ` Jason Wang
2013-03-19 12:13         ` Eric Dumazet
2013-03-19 12:58           ` Daniel Borkmann
2013-03-19 12:59             ` Eric Dumazet
2013-03-19 13:52               ` Daniel Borkmann
2013-03-17 16:10 ` David Miller [this message]
2013-03-19  9:25   ` [PATCH net-next 1/2] net_sched: don't do precise pkt_len computation for untrusted packets Jason Wang
2013-03-19 12:10     ` Eric Dumazet
2013-03-19 12:58       ` Eric Dumazet
2013-03-20  6:19         ` Jason Wang
2013-03-20 13:46           ` Eric Dumazet

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=20130317.121026.733329595817911776.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.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).