Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Netdev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Ido Schimmel <idosch@idosch.org>,
chouhan.shreyansh630@gmail.com
Subject: Re: [PATCH net] ip_gre: validate csum_start only if CHECKSUM_PARTIAL
Date: Sun, 5 Sep 2021 23:02:23 -0400 [thread overview]
Message-ID: <CA+FuTSe+vJgTVLc9SojGuN-f9YQ+xWLPKE_S4f=f+w+_P2hgUg@mail.gmail.com> (raw)
In-Reply-To: <CAKgT0UeH3aTnMKqzmtqfWrtmkW6cB=Mk6OSJi0FvmDEbmNAd+Q@mail.gmail.com>
On Sun, Sep 5, 2021 at 11:53 AM Alexander Duyck
<alexander.duyck@gmail.com> wrote:
>
> On Sun, Sep 5, 2021 at 8:24 AM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> >
> > On Sat, Sep 4, 2021 at 7:47 PM Alexander Duyck
> > <alexander.duyck@gmail.com> wrote:
>
> <snip>
>
> > > You can do it since you have essentially already written half the code.. :)
> >
> > Sent, but only the ipv4 patch.
> >
> > I actually do not see an equivalent skb_pull path in ip6_gre.c. Will
> > take a closer look later, but don't have time for that now.
> >
> > https://patchwork.kernel.org/project/netdevbpf/patch/20210905152109.1805619-1-willemdebruijn.kernel@gmail.com/
>
> So does that mean that commit 9cf448c200ba ("ip6_gre: add validation
> for csum_start") is adding overhead that doesn't really address
> anything, and is introducing false positives? If so, should we just
> revert it?
I agree.
I didn't immediately understand how there can be an ip6gre_header
analogous to ipgre_header (for headers_ops.create), but no skb_pull
in ip6gre_tunnel_xmit equivalent to the one in ipgre_xmit.
One difference between the two of them is the return value, which
returns an offset: ip6gre_header returns t->hlen. ipgre_header returns
t->hlen + sizeof(*iph). This extra offset was introduced in commit
77a482bdb2e6 ("ip_gre: fix ipgre_header to return correct offset") as
a fix to previous commit c544193214 ("GRE: Refactor GRE tunneling
code."). Before the latter commit the IPv4 header was included in
t->hlen, similar to IPv6. After that commit it is no longer. The latter
patch is also the one that introduces the skb_pull in ipgre_xmit.
I can't say that I fully understand how this works for IPv6.
But I think that is sufficient to understand that this skb_pull issue
does not affect the ip6_gre path and we best just revert that commit.
next prev parent reply other threads:[~2021-09-06 3:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 19:34 [PATCH net] ip6_gre: " Willem de Bruijn
2021-09-02 19:34 ` [PATCH net] ip_gre: " Willem de Bruijn
2021-09-02 20:25 ` Alexander Duyck
2021-09-02 20:29 ` Willem de Bruijn
2021-09-02 21:17 ` Alexander Duyck
2021-09-02 21:44 ` Willem de Bruijn
2021-09-03 2:01 ` Alexander Duyck
2021-09-03 2:40 ` Willem de Bruijn
2021-09-03 16:46 ` Alexander Duyck
2021-09-03 19:38 ` Willem de Bruijn
2021-09-03 23:13 ` Alexander Duyck
2021-09-04 14:45 ` Willem de Bruijn
2021-09-04 15:35 ` Alexander Duyck
2021-09-04 21:40 ` Willem de Bruijn
2021-09-04 21:53 ` Alexander Duyck
2021-09-04 22:05 ` Willem de Bruijn
2021-09-04 23:47 ` Alexander Duyck
2021-09-05 15:24 ` Willem de Bruijn
2021-09-05 15:53 ` Alexander Duyck
2021-09-06 3:02 ` Willem de Bruijn [this message]
2021-09-02 20:27 ` [PATCH net] ip6_gre: " Alexander Duyck
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='CA+FuTSe+vJgTVLc9SojGuN-f9YQ+xWLPKE_S4f=f+w+_P2hgUg@mail.gmail.com' \
--to=willemdebruijn.kernel@gmail.com \
--cc=alexander.duyck@gmail.com \
--cc=chouhan.shreyansh630@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH net] ip_gre: validate csum_start only if CHECKSUM_PARTIAL' \
/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
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).