Re: pull-request: bpf-next 2018-03-03

2018-03-02 Thread David Miller
From: Daniel Borkmann 
Date: Sat,  3 Mar 2018 02:42:01 +0100

> The following pull-request contains BPF updates for your *net-next* tree.
> 
> The main changes are:
> 
> 1) Extend bpftool to build up CFG information of eBPF programs and add an
>option to dump this in DOT format such that this can later be used with
>DOT graphic tools (xdot, graphviz, etc) to visualize it. Part of the
>analysis performed is sub-program detection and basic-block partitioning,
>from Jiong.
> 
> 2) Multiple enhancements for bpftool's batch mode, more specifically the
>parser now understands comments (#), continuation lines (\), and arguments
>enclosed between quotes. Also, allow to read from stdin via '-' as input
>file, all from Quentin.
> 
> 3) Improve BPF kselftests by i) unifying the rlimit handling into a helper
>that is then used by all tests, and ii) add support for testing tail calls
>to test_verifier plus add tests covering all corner cases. The latter is
>especially useful for testing JITs, from Daniel.
> 
> 4) Remove x64 JIT's bpf_flush_icache() since flush_icache_range() is a noop
>on x64, from Daniel.
> 
> 5) Fix one more occasion in BPF samples where we do not detach the BPF program
>from the cgroup after completion, from Prashant.
> 
> Please consider pulling these changes from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Pulled, thanks Daniel.


pull-request: bpf-next 2018-03-03

2018-03-02 Thread Daniel Borkmann
Hi David,

The following pull-request contains BPF updates for your *net-next* tree.

The main changes are:

1) Extend bpftool to build up CFG information of eBPF programs and add an
   option to dump this in DOT format such that this can later be used with
   DOT graphic tools (xdot, graphviz, etc) to visualize it. Part of the
   analysis performed is sub-program detection and basic-block partitioning,
   from Jiong.

2) Multiple enhancements for bpftool's batch mode, more specifically the
   parser now understands comments (#), continuation lines (\), and arguments
   enclosed between quotes. Also, allow to read from stdin via '-' as input
   file, all from Quentin.

3) Improve BPF kselftests by i) unifying the rlimit handling into a helper
   that is then used by all tests, and ii) add support for testing tail calls
   to test_verifier plus add tests covering all corner cases. The latter is
   especially useful for testing JITs, from Daniel.

4) Remove x64 JIT's bpf_flush_icache() since flush_icache_range() is a noop
   on x64, from Daniel.

5) Fix one more occasion in BPF samples where we do not detach the BPF program
   from the cgroup after completion, from Prashant.

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 3808b51911fe1a2bf8d6f4f2836d4c51aa29a6fd:

  Merge branch '10GbE' of 
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue (2018-02-26 
20:58:25 -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 c51a63797acc159ead1e7b136119b18865e909c3:

  Merge branch 'bpf-bpftool-batch-improvements' (2018-03-02 09:46:42 +0100)


Alexei Starovoitov (2):
  Merge branch 'bpf-kselftest-improvements'
  Merge branch 'bpftool-visualization'

Daniel Borkmann (4):
  bpf: unify rlimit handling in selftests
  bpf: add tail call tests to test_verifier
  bpf, x64: remove bpf_flush_icache
  Merge branch 'bpf-bpftool-batch-improvements'

Jiong Wang (7):
  tools: bpftool: remove unnecessary 'if' to reduce indentation
  tools: bpftool: factor out xlated dump related code into separate file
  tools: bpftool: detect sub-programs from the eBPF sequence
  tools: bpftool: partition basic-block for each function in the CFG
  tools: bpftool: add out edges for each basic-block
  tools: bpftool: generate .dot graph from CFG information
  tools: bpftool: new command-line option and documentation for 'visual'

Prashant Bhole (1):
  samples/bpf: detach prog from cgroup

Quentin Monnet (5):
  tools: bpftool: add bash completion for CFG dump
  tools: bpftool: support comments in batch files
  tools: bpftool: support continuation lines in batch files
  tools: bpftool: read from stdin when batch file name is "-"
  tools: bpftool: add support for quotations in batch files

 arch/x86/net/bpf_jit_comp.c  |  15 +-
 samples/bpf/test_cgrp2_sock.sh   |   1 +
 samples/bpf/test_cgrp2_sock2.sh  |   3 +
 tools/bpf/bpftool/Documentation/bpftool-prog.rst |  18 +-
 tools/bpf/bpftool/bash-completion/bpftool|  13 +-
 tools/bpf/bpftool/cfg.c  | 514 +++
 tools/bpf/bpftool/cfg.h  |  43 ++
 tools/bpf/bpftool/main.c | 104 -
 tools/bpf/bpftool/prog.c | 305 ++
 tools/bpf/bpftool/xlated_dumper.c| 338 +++
 tools/bpf/bpftool/xlated_dumper.h|  64 +++
 tools/testing/selftests/bpf/bpf_rlimit.h |  28 ++
 tools/testing/selftests/bpf/test_align.c |   6 +-
 tools/testing/selftests/bpf/test_dev_cgroup.c|   6 +-
 tools/testing/selftests/bpf/test_lpm_map.c   |  14 +-
 tools/testing/selftests/bpf/test_lru_map.c   |   6 +-
 tools/testing/selftests/bpf/test_maps.c  |   7 +-
 tools/testing/selftests/bpf/test_progs.c |   7 +-
 tools/testing/selftests/bpf/test_tag.c   |   4 +-
 tools/testing/selftests/bpf/test_tcpbpf_user.c   |   6 +-
 tools/testing/selftests/bpf/test_verifier.c  | 123 +-
 tools/testing/selftests/bpf/test_verifier_log.c  |   8 +-
 22 files changed, 1259 insertions(+), 374 deletions(-)
 create mode 100644 tools/bpf/bpftool/cfg.c
 create mode 100644 tools/bpf/bpftool/cfg.h
 create mode 100644 tools/bpf/bpftool/xlated_dumper.c
 create mode 100644 tools/bpf/bpftool/xlated_dumper.h
 create mode 100644 tools/testing/selftests/bpf/bpf_rlimit.h