From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH net] udp: preserve skb->dst if required for IP options processing
Date: Tue, 18 Jul 2017 09:50:14 +0200 [thread overview]
Message-ID: <1500364214.2538.2.camel@redhat.com> (raw)
In-Reply-To: <1500326770.5566.26.camel@edumazet-glaptop3.roam.corp.google.com>
On Mon, 2017-07-17 at 14:26 -0700, Eric Dumazet wrote:
> On Mon, 2017-07-17 at 22:59 +0200, Paolo Abeni wrote:
> > Eric noticed that in udp_recvmsg() we still need to access
> > skb->dst while processing the IP options.
> > Since commit 0a463c78d25b ("udp: avoid a cache miss on dequeue")
> > skb->dst is no more available at recvmsg() time and bad things
> > will happen if we enter the relevant code path.
> >
> > This commit address the issue, avoid clearing skb->dst if
> > any IP options are present into the relevant skb.
> > Since the IP CB is contained in the first skb cacheline, we can
> > test it to decide to leverage the consume_stateless_skb()
> > optimization, without measurable additional cost in the faster
> > path.
> >
> > Fixes: b65ac44674dd ("udp: try to avoid 2 cache miss on dequeue")
>
> Strange.... I thought bug was coming from
> commit 0a463c78d25b ("udp: avoid a cache miss on dequeue")
You are right - and I was wrong with this tag.
>
> Please also add original reporter, from syzkaller team.
>
> Reported-by: Andrey Konovalov <andreyknvl@google.com>
I'll resubmit soon a v2 with the update tags. I'm not sure if I must or
must not retain your ack ?
BTW I think that __ip_options_echo() also needs to access skb->dev, via
fib_compute_spec_dst(), and perhaps another patch is needed. I'll look
at that today.
Thanks,
Paolo
next prev parent reply other threads:[~2017-07-18 7:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 9:23 [PATCH net-next v3 0/3] udp: reduce cache pressure Paolo Abeni
2017-06-12 9:23 ` [PATCH net-next v3 1/3] net: factor out a helper to decrement the skb refcount Paolo Abeni
2017-06-12 9:23 ` [PATCH net-next v3 2/3] udp: avoid a cache miss on dequeue Paolo Abeni
2017-07-17 7:04 ` Eric Dumazet
2017-07-17 20:59 ` [PATCH net] udp: preserve skb->dst if required for IP options processing Paolo Abeni
2017-07-17 21:26 ` Eric Dumazet
2017-07-18 7:50 ` Paolo Abeni [this message]
2017-07-17 21:30 ` Eric Dumazet
2017-07-17 21:35 ` Eric Dumazet
2017-06-12 9:23 ` [PATCH net-next v3 3/3] udp: try to avoid 2 cache miss on dequeue Paolo Abeni
2017-06-22 13:06 ` DNS (?) not working on G5 (64-bit powerpc) (was [net-next, v3, 3/3] udp: try to avoid 2 cache miss on dequeue) Michael Ellerman
2017-06-22 16:43 ` DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] " Paolo Abeni
2017-06-22 20:27 ` Paolo Abeni
2017-06-22 20:28 ` Paolo Abeni
2017-06-22 20:57 ` Paolo Abeni
2017-06-22 21:18 ` Hannes Frederic Sowa
2017-06-23 6:59 ` Michael Ellerman
2017-06-23 11:59 ` Paolo Abeni
2017-06-26 3:15 ` Michael Ellerman
2017-06-12 14:01 ` [PATCH net-next v3 0/3] udp: reduce cache pressure David Miller
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=1500364214.2538.2.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=hannes@stressinduktion.org \
--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).