[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a47986a65825121e67ccf831d0b9938862a6e36.camel@infradead.org>
Date: Mon, 28 Jun 2021 11:43:30 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Jason Wang <jasowang@...hat.com>, netdev@...r.kernel.org
Cc: Eugenio PĂ©rez <eperezma@...hat.com>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH v3 4/5] net: tun: fix tun_xdp_one() for IFF_TUN mode
On Mon, 2021-06-28 at 12:27 +0800, Jason Wang wrote:
> > If we're going to continue to *not* check on the XDP path, we similarly
> > need a proof that it can't be fragmented. And also a reason to bother
> > with the "optimisation", of course.
>
>
> For XDP path, we simply need to add a length check since the packet is
> always a linear memory.
Sure, but in that case skb_headlen is going to be enough to cover
ETH_HLEN, and that's the very first thing that the standard inline
version of pskb_may_pull() checks, without ever even having to make an
out-of-line call.
So there's just no reason ever for us *not* to keep it really simple,
and use pskb_may_pull() in all cases.
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5174 bytes)
Powered by blists - more mailing lists