Re: [PATCH net-next 1/2] net_sched: don't do precise pkt_lencomputation for untrusted packets

From: David Miller
Date: Sun Mar 17 2013 - 12:10:49 EST

From: Jason Wang <jasowang@xxxxxxxxxx>
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@xxxxxxxxxx>
> Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>

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

When we do precise accounting, it increases, never decreases, the
amount that a packet "costs" as far as the packet scheduler is
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at