From: Sabrina Dubroca <sd@queasysnail.net>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemb@google.com>,
steffen.klassert@secunet.com
Subject: Re: [PATCH net-next] udp_tunnel: properly deal with xfrm gro encap.
Date: Thu, 20 Mar 2025 15:44:04 +0100 [thread overview]
Message-ID: <Z9wptMoWONs0FAFo@krikkit> (raw)
In-Reply-To: <4619a067-6e54-47fd-aa8b-3397a032aae0@redhat.com>
2025-03-19, 16:49:21 +0100, Paolo Abeni wrote:
>
>
> On 3/19/25 3:35 PM, Willem de Bruijn wrote:
> > Paolo Abeni wrote:
> >> The blamed commit below does not take in account that xfrm
> >> can enable GRO over UDP encapsulation without going through
> >> setup_udp_tunnel_sock().
> >>
> >> At deletion time such socket will still go through
> >> udp_tunnel_cleanup_gro(), and the failed GRO type lookup will
> >> trigger the reported warning.
> >>
> >> We can safely remove such warning, simply performing no action
> >> on failed GRO type lookup at deletion time.
> >>
> >> Reported-by: syzbot+8c469a2260132cd095c1@syzkaller.appspotmail.com
> >> Closes: https://syzkaller.appspot.com/bug?extid=8c469a2260132cd095c1
> >> Fixes: 311b36574ceac ("udp_tunnel: use static call for GRO hooks when possible")
> >> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> >
> > Because XFRM does not call udp_tunnel_update_gro_rcv when enabling its
> > UDP GRO offload, from set_xfrm_gro_udp_encap_rcv. But it does call it
> > when disabling the offload, as called for all udp sockest from
> > udp(v6)_destroy_sock. (Just to verify my understanding.)
>
> Exactly.
>
> > Not calling udp_tunnel_update_gro_rcv on add will have the unintended
> > side effect of enabling the static call if one other tunnel is also
> > active, breaking UDP GRO for XFRM socket, right?
>
> Ouch, right again. I think we can/should do better.
We should be able to adapt xfrm to use setup_udp_tunnel_sock, but it's
not a simple conversion because GRO could be enabled separately from
the encap itself. I'm not sure there's much benefit except for a bit
more consistency when we enable the encap with GRO at once (but we'd
still have that odd set_xfrm_gro_udp_encap_rcv to enable GRO after
ESPINUDP has been set up). A few of the UDP encaps that precede
setup_udp_tunnel_sock have been converted, I don't know why ipsec was
left.
--
Sabrina
prev parent reply other threads:[~2025-03-20 14:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 18:47 [PATCH net-next] udp_tunnel: properly deal with xfrm gro encap Paolo Abeni
2025-03-19 14:35 ` Willem de Bruijn
2025-03-19 15:49 ` Paolo Abeni
2025-03-19 17:44 ` Willem de Bruijn
2025-03-19 22:15 ` Paolo Abeni
2025-03-20 13:50 ` Willem de Bruijn
2025-03-20 14:44 ` Sabrina Dubroca [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=Z9wptMoWONs0FAFo@krikkit \
--to=sd@queasysnail.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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).