All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, john.fastabend@gmail.com
Subject: [bpf PATCH 0/4] sockhash/sockmap fixes
Date: Thu, 05 Jul 2018 08:36:11 -0700	[thread overview]
Message-ID: <20180705152803.15312.47795.stgit@john-Precision-Tower-5810> (raw)

First three patches resolve issues found while testing sockhash and
reviewing code. Syzbot also found them about the same time as I was
working on fixes. The main issue is in the sockhash path we reduced
the scope of sk_callback lock but this meant we could get update and
close running in parallel so fix that here.

Then testing sk_msg and sk_skb programs together found that skb->dev
is not always assigned and some of the helpers were depending on this
to lookup max mtu. Fix this by using SKB_MAX_ALLOC when no MTU is
available.

Finally, Martin spotted that the sockmap code was still using the
qdisc skb cb structure. But I was sure we had fixed this long ago.
Looks like we missed it in a merge conflict resolution and then by
chance data_end offset was the same in both structures so everything
sort of continued to work even though it could break at any moment
if the structs ever change. So redo the conversion and this time
also convert the helpers.

---

John Fastabend (4):
      bpf: fix sk_skb programs without skb->dev assigned
      bpf: sockhash, disallow bpf_tcp_close and update in parallel
      bpf: sockmap, consume_skb in close path
      bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb


 0 files changed

             reply	other threads:[~2018-07-05 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 15:36 John Fastabend [this message]
2018-07-05 15:36 ` [bpf PATCH 1/4] bpf: fix sk_skb programs without skb->dev assigned John Fastabend
2018-07-05 15:36 ` [bpf PATCH 2/4] bpf: sockhash, disallow bpf_tcp_close and update in parallel John Fastabend
2018-07-05 15:36 ` [bpf PATCH 3/4] bpf: sockmap, consume_skb in close path John Fastabend
2018-07-05 15:36 ` [bpf PATCH 4/4] bpf: sockmap, convert bpf_compute_data_pointers to bpf_*_sk_skb John Fastabend
2018-07-05 15:48 ` [bpf PATCH 0/4] sockhash/sockmap fixes John Fastabend

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=20180705152803.15312.47795.stgit@john-Precision-Tower-5810 \
    --to=john.fastabend@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.