netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] BPF updates
@ 2016-04-12 22:10 Daniel Borkmann
  2016-04-12 22:10 ` [PATCH net-next 1/5] bpf, verifier: add bpf_call_arg_meta for passing meta data Daniel Borkmann
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Daniel Borkmann @ 2016-04-12 22:10 UTC (permalink / raw)
  To: davem
  Cc: alexei.starovoitov, tgraf, bblanco, brendan.d.gregg, netdev,
	Daniel Borkmann

This series adds a new verifier argument type called
ARG_PTR_TO_RAW_STACK and converts related helpers to make
use of it. Basic idea is that we can save init of stack
memory when the helper function is guaranteed to fully
fill out the passed buffer in every path. Series also adds
test cases and converts samples. For more details, please
see individual patches.

Thanks!

Daniel Borkmann (5):
  bpf, verifier: add bpf_call_arg_meta for passing meta data
  bpf, verifier: add ARG_PTR_TO_RAW_STACK type
  bpf: convert relevant helper args to ARG_PTR_TO_RAW_STACK
  bpf, samples: don't zero data when not needed
  bpf, samples: add test cases for raw stack

 include/linux/bpf.h            |   5 +
 kernel/bpf/helpers.c           |  17 ++-
 kernel/bpf/verifier.c          |  97 +++++++++++----
 kernel/trace/bpf_trace.c       |  10 +-
 net/core/filter.c              |  57 ++++++---
 samples/bpf/offwaketime_kern.c |  10 +-
 samples/bpf/test_verifier.c    | 268 +++++++++++++++++++++++++++++++++++++++++
 samples/bpf/tracex1_kern.c     |   4 +-
 samples/bpf/tracex2_kern.c     |   4 +-
 samples/bpf/tracex5_kern.c     |   6 +-
 10 files changed, 421 insertions(+), 57 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH net-next 0/5] BPF updates
@ 2014-05-23 16:43 Daniel Borkmann
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Borkmann @ 2014-05-23 16:43 UTC (permalink / raw)
  To: davem; +Cc: ast, netdev

These were still in my queue. Please see individual patches for
details.

I have rebased these on top of current net-next with Andrew's
gcc union fixup [1] applied to avoid dealing with an unnecessary
merge conflict.

Thanks !

 [1] http://patchwork.ozlabs.org/patch/351577/

Daniel Borkmann (5):
  net: filter: remove DL macro
  net: filter: let unattached filters use sock_fprog_kern
  net: filter: doc: add section for BPF test suite
  net: filter: improve test case framework
  net: filter: add test case for jump with holes and ret x variants

 Documentation/networking/filter.txt      |  14 +
 drivers/isdn/i4l/isdn_ppp.c              |   4 +-
 drivers/net/ppp/ppp_generic.c            |   4 +-
 drivers/net/team/team_mode_loadbalance.c |  10 +-
 include/linux/filter.h                   |   5 +-
 lib/test_bpf.c                           | 482 +++++++++++++++++++++----------
 net/core/filter.c                        | 195 +++++++------
 net/core/ptp_classifier.c                |   2 +-
 net/netfilter/xt_bpf.c                   |   5 +-
 net/sched/cls_bpf.c                      |   4 +-
 10 files changed, 457 insertions(+), 268 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH net-next 0/5] BPF updates
@ 2014-04-23 20:56 Daniel Borkmann
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Borkmann @ 2014-04-23 20:56 UTC (permalink / raw)
  To: davem; +Cc: ast, netdev

I had these cleanups still in my queue before the merge window.
The set is against net-next tree, but with 83d5b7ef99 ("net: filter:
initialize A and X registers") applied on top of it, so a merge
of net into net-next would be required *before* applying this set.

The main objective for these updates is that we get the code
a bit more readable/comprehensible and avoid one additional
instruction in the interpreter during fast-path.

Tested with Alexei's BPF test suite and seccomp test suite, no
issues found.

Thanks!

Daniel Borkmann (5):
  net: filter: simplify label names from jump-table
  net: filter: misc/various cleanups
  net: filter: get rid of sock_fprog_kern
  net: filter: make register namings more comprehensible
  net: filter: optimize BPF migration for ARG1/CTX handling

 include/linux/filter.h |  60 ++++--
 net/core/filter.c      | 564 ++++++++++++++++++++++++-------------------------
 net/core/sock_diag.c   |   4 +-
 3 files changed, 325 insertions(+), 303 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-15  1:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12 22:10 [PATCH net-next 0/5] BPF updates Daniel Borkmann
2016-04-12 22:10 ` [PATCH net-next 1/5] bpf, verifier: add bpf_call_arg_meta for passing meta data Daniel Borkmann
2016-04-12 22:10 ` [PATCH net-next 2/5] bpf, verifier: add ARG_PTR_TO_RAW_STACK type Daniel Borkmann
2016-04-12 22:10 ` [PATCH net-next 3/5] bpf: convert relevant helper args to ARG_PTR_TO_RAW_STACK Daniel Borkmann
2016-04-12 22:10 ` [PATCH net-next 4/5] bpf, samples: don't zero data when not needed Daniel Borkmann
2016-04-12 22:10 ` [PATCH net-next 5/5] bpf, samples: add test cases for raw stack Daniel Borkmann
2016-04-15  1:37 ` [PATCH net-next 0/5] BPF updates David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-05-23 16:43 Daniel Borkmann
2014-04-23 20:56 Daniel Borkmann

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).