[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180321012914.13569-1-daniel@iogearbox.net>
Date: Wed, 21 Mar 2018 02:29:14 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: davem@...emloft.net
Cc: daniel@...earbox.net, ast@...nel.org, netdev@...r.kernel.org
Subject: pull-request: bpf-next 2018-03-21
Hi David,
The following pull-request contains BPF updates for your *net-next* tree.
The main changes are:
1) Add a BPF hook for sendmsg and sendfile by reusing the ULP infrastructure
and sockmap. Three helpers are added along with this, bpf_msg_apply_bytes(),
bpf_msg_cork_bytes(), and bpf_msg_pull_data(). The first is used to tell
for how many bytes the verdict should be applied to, the second to tell
that x bytes need to be queued first to retrigger the BPF program for a
verdict, and the third helper is mainly for the sendfile case to pull in
data for making it private for reading and/or writing, from John.
2) Improve address to symbol resolution of user stack traces in BPF stackmap.
Currently, the latter stores the address for each entry in the call trace,
however to map these addresses to user space files, it is necessary to
maintain the mapping from these virtual addresses to symbols in the binary
which is not practical for system-wide profiling. Instead, this option for
the stackmap rather stores the ELF build id and offset for the call trace
entries, from Song.
3) Add support that allows BPF programs attached to perf events to read the
address values recorded with the perf events. They are requested through
PERF_SAMPLE_ADDR via perf_event_open(). Main motivation behind it is to
support building memory or lock access profiling and tracing tools with
the help of BPF, from Teng.
4) Several improvements to the tools/bpf/ Makefiles. The 'make bpf' in the
tools directory does not provide the standard quiet output except for
bpftool and it also does not respect specifying a build output directory.
'make bpf_install' command neither respects specified destination nor
prefix, all from Jiri. In addition, Jakub fixes several other minor issues
in the Makefiles on top of that, e.g. fixing dependency paths, phony
targets and more.
5) Various doc updates e.g. add a comment for BPF fs about reserved names
to make the dentry lookup from there a bit more obvious, and a comment
to the bpf_devel_QA file in order to explain the diff between native
and bpf target clang usage with regards to pointer size, from Quentin
and Daniel.
Please consider pulling these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
Thanks a lot!
----------------------------------------------------------------
The following changes since commit a366e300ae9fc466d333e6d8f2bc5d58ed248041:
ip6mr: remove synchronize_rcu() in favor of SOCK_RCU_FREE (2018-03-07 18:13:41 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
for you to fetch changes up to 78262f4575c29f185947fe58952cd1beabc74f82:
bpf, doc: add description wrt native/bpf clang target and pointer size (2018-03-20 15:47:45 -0700)
----------------------------------------------------------------
Daniel Borkmann (6):
Merge branch 'bpf-perf-sample-addr'
Merge branch 'bpf-tools-makefile-improvements'
Merge branch 'bpf-stackmap-build-id'
Merge branch 'bpf-tools-build-improvements'
Merge branch 'bpf-sockmap-ulp'
bpf, doc: add description wrt native/bpf clang target and pointer size
Jakub Kicinski (4):
tools: bpftool: fix dependency file path
tools: bpftool: fix potential format truncation
tools: bpf: cleanup PHONY target
tools: bpf: remove feature detection output
Jiri Benc (7):
tools: bpftool: silence 'missing initializer' warnings
tools: bpf: respect output directory during build
tools: bpf: consistent make bpf_install
tools: bpf: make install should build first
tools: bpf: call descend in Makefile
tools: bpf: respect quiet/verbose build
tools: bpf: silence make by not deleting intermediate file
John Fastabend (18):
sock: make static tls function alloc_sg generic sock helper
sockmap: convert refcnt to an atomic refcnt
net: do_tcp_sendpages flag to avoid SKBTX_SHARED_FRAG
net: generalize sk_alloc_sg to work with scatterlist rings
bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data
bpf: sockmap, add bpf_msg_apply_bytes() helper
bpf: sockmap, add msg_cork_bytes() helper
bpf: sk_msg program helper bpf_sk_msg_pull_data
bpf: add map tests for BPF_PROG_TYPE_SK_MSG
bpf: add verifier tests for BPF_PROG_TYPE_SK_MSG
bpf: sockmap sample, add option to attach SK_MSG program
bpf: sockmap sample, add sendfile test
bpf: sockmap sample, add data verification option
bpf: sockmap, add sample option to test apply_bytes helper
bpf: sockmap sample support for bpf_msg_cork_bytes()
bpf: sockmap add SK_DROP tests
bpf: sockmap sample test for bpf_msg_pull_data
bpf: sockmap test script
Quentin Monnet (1):
bpf: comment why dots in filenames under BPF virtual FS are not allowed
Song Liu (2):
bpf: extend stackmap to save binary_build_id+offset instead of address
bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID
Teng Qin (2):
bpf: add support to read sample address in bpf program
samples/bpf: add example to test reading address
Documentation/bpf/bpf_devel_QA.txt | 12 +
include/linux/bpf.h | 1 +
include/linux/bpf_types.h | 1 +
include/linux/filter.h | 17 +
include/linux/socket.h | 1 +
include/net/sock.h | 4 +
include/uapi/linux/bpf.h | 47 +-
include/uapi/linux/bpf_perf_event.h | 1 +
kernel/bpf/inode.c | 3 +
kernel/bpf/sockmap.c | 733 ++++++++++++++++++++-
kernel/bpf/stackmap.c | 257 +++++++-
kernel/bpf/syscall.c | 14 +-
kernel/bpf/verifier.c | 5 +-
kernel/trace/bpf_trace.c | 20 +-
net/core/filter.c | 273 +++++++-
net/core/sock.c | 61 ++
net/ipv4/tcp.c | 4 +-
net/tls/tls_sw.c | 69 +-
samples/bpf/bpf_load.c | 8 +-
samples/bpf/trace_event_kern.c | 4 +
samples/bpf/trace_event_user.c | 15 +
samples/sockmap/sockmap_kern.c | 197 ++++++
samples/sockmap/sockmap_test.sh | 450 +++++++++++++
samples/sockmap/sockmap_user.c | 301 ++++++++-
tools/bpf/Makefile | 78 ++-
tools/bpf/bpftool/Makefile | 6 +-
tools/bpf/bpftool/xlated_dumper.h | 2 +-
tools/include/uapi/linux/bpf.h | 47 +-
tools/lib/bpf/libbpf.c | 1 +
tools/testing/selftests/bpf/Makefile | 13 +-
tools/testing/selftests/bpf/bpf_helpers.h | 10 +
tools/testing/selftests/bpf/sockmap_parse_prog.c | 15 +-
tools/testing/selftests/bpf/sockmap_tcp_msg_prog.c | 33 +
tools/testing/selftests/bpf/sockmap_verdict_prog.c | 7 +
tools/testing/selftests/bpf/test_maps.c | 55 +-
tools/testing/selftests/bpf/test_progs.c | 164 ++++-
.../selftests/bpf/test_stacktrace_build_id.c | 60 ++
tools/testing/selftests/bpf/test_verifier.c | 54 ++
tools/testing/selftests/bpf/urandom_read.c | 22 +
39 files changed, 2879 insertions(+), 186 deletions(-)
create mode 100755 samples/sockmap/sockmap_test.sh
create mode 100644 tools/testing/selftests/bpf/sockmap_tcp_msg_prog.c
create mode 100644 tools/testing/selftests/bpf/test_stacktrace_build_id.c
create mode 100644 tools/testing/selftests/bpf/urandom_read.c
Powered by blists - more mailing lists