netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org
Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net,
	oss-drivers@netronome.com,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 0/5] bpf: get rid of global verifier state and reuse instruction printer
Date: Thu,  5 Oct 2017 08:34:17 -0700	[thread overview]
Message-ID: <20171005153422.8947-1-jakub.kicinski@netronome.com> (raw)

Hi!

This set started off as simple extraction of eBPF verifier's instruction
printer into a separate file but evolved into removal of global state...
The purpose of moving instruction printing code is to be able to reuse it
from the bpftool.

As far as the global verifier lock goes, this set removes the global
variables relating to the log buffer, makes the one-time init done
by bpf_get_skb_set_tunnel_proto() not depend on any external locking,
and performs verifier log writeback as data is produced removing the need
for allocating a potentially large temporary buffer.

The final step of actually removing the verifier lock is left to someone
more competent and self-confident :)


Jakub Kicinski (5):
  bpf: remove global verifier log
  bpf: move instruction printing into a separate file
  tools: bpftool: use the kernel's instruction printer
  bpf: don't rely on the verifier lock for metadata_dst allocation
  bpf: write back the verifier log buffer as it gets filled

 include/linux/bpf_verifier.h                     |   8 +
 include/net/dst_metadata.h                       |   1 +
 kernel/bpf/Makefile                              |   1 +
 kernel/bpf/disasm.c                              | 214 +++++++
 kernel/bpf/disasm.h                              |  32 +
 kernel/bpf/verifier.c                            | 710 +++++++++--------------
 net/core/dst.c                                   |  16 +
 net/core/filter.c                                |  16 +-
 tools/bpf/bpftool/Documentation/bpftool-prog.rst |  11 +-
 tools/bpf/bpftool/Makefile                       |   7 +-
 tools/bpf/bpftool/main.h                         |  10 +-
 tools/bpf/bpftool/prog.c                         |  44 +-
 12 files changed, 618 insertions(+), 452 deletions(-)
 create mode 100644 kernel/bpf/disasm.c
 create mode 100644 kernel/bpf/disasm.h

-- 
2.14.1

             reply	other threads:[~2017-10-05 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 15:34 Jakub Kicinski [this message]
2017-10-05 15:34 ` [PATCH net-next 1/5] bpf: remove global verifier log Jakub Kicinski
2017-10-05 15:34 ` [PATCH net-next 2/5] bpf: move instruction printing into a separate file Jakub Kicinski
2017-10-05 15:34 ` [PATCH net-next 3/5] tools: bpftool: use the kernel's instruction printer Jakub Kicinski
2017-10-05 15:34 ` [PATCH net-next 4/5] bpf: don't rely on the verifier lock for metadata_dst allocation Jakub Kicinski
2017-10-05 15:34 ` [PATCH net-next 5/5] bpf: write back the verifier log buffer as it gets filled Jakub Kicinski
2017-10-05 21:10   ` Daniel Borkmann
2017-10-05 21:26     ` Jakub Kicinski
2017-10-05 21:45       ` Daniel Borkmann

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=20171005153422.8947-1-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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).