lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180107235616.20607-1-daniel@iogearbox.net>
Date:   Mon,  8 Jan 2018 00:56:16 +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-01-07

Hi David,

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

The main changes are:

1) Add a start of a framework for extending struct xdp_buff without
   having the overhead of populating every data at runtime. Idea
   is to have a new per-queue struct xdp_rxq_info that holds read
   mostly data (currently that is, queue number and a pointer to
   the corresponding netdev) which is set up during rxqueue config
   time. When a XDP program is invoked, struct xdp_buff holds a
   pointer to struct xdp_rxq_info that the BPF program can then
   walk. The user facing BPF program that uses struct xdp_md for
   context can use these members directly, and the verifier rewrites
   context access transparently by walking the xdp_rxq_info and
   net_device pointers to load the data, from Jesper.

2) Redo the reporting of offload device information to user space
   such that it works in combination with network namespaces. The
   latter is reported through a device/inode tuple as similarly
   done in other subsystems as well (e.g. perf) in order to identify
   the namespace. For this to work, ns_get_path() has been generalized
   such that the namespace can be retrieved not only from a specific
   task (perf case), but also from a callback where we deduce the
   netns (ns_common) from a netdevice. bpftool support using the new
   uapi info and extensive test cases for test_offload.py in BPF
   selftests have been added as well, from Jakub.

3) Add two bpftool improvements: i) properly report the bpftool
   version such that it corresponds to the version from the kernel
   source tree. So pick the right linux/version.h from the source
   tree instead of the installed one. ii) fix bpftool and also
   bpf_jit_disasm build with bintutils >= 2.9. The reason for the
   build breakage is that binutils library changed the function
   signature to select the disassembler. Given this is needed in
   multiple tools, add a proper feature detection to the
   tools/build/features infrastructure, from Roman.

4) Implement the BPF syscall command BPF_MAP_GET_NEXT_KEY for the
   stacktrace map. It is currently unimplemented, but there are
   use cases where user space needs to walk all stacktrace map
   entries e.g. for dumping or deleting map entries w/o having to
   close and recreate the map. Add BPF selftests along with it,
   from Yonghong.

5) Few follow-up cleanups for the bpftool cgroup code: i) rename
   the cgroup 'list' command into 'show' as we have it for other
   subcommands as well, ii) then alias the 'show' command such that
   'list' is accepted which is also common practice in iproute2,
   and iii) remove couple of newlines from error messages using
   p_err(), from Jakub.

6) Two follow-up cleanups to sockmap code: i) remove the unused
   bpf_compute_data_end_sk_skb() function and ii) only build the
   sockmap infrastructure when CONFIG_INET is enabled since it's
   only aware of TCP sockets at this time, from John.

Please consider pulling these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Thanks a lot & a happy new year!

----------------------------------------------------------------

The following changes since commit 6bb8824732f69de0f233ae6b1a8158e149627b38:

  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2017-12-29 15:42:26 -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 9be99badee761f0b2c065ecbd8bd54a96cbd0fa0:

  Merge branch 'bpf-stacktrace-map-next-key-support' (2018-01-06 23:52:23 +0100)

----------------------------------------------------------------
Alexei Starovoitov (1):
      Merge branch 'xdp_rxq_info'

Daniel Borkmann (3):
      Merge branch 'bpf-offload-report-dev'
      Merge branch 'bpf-bpftool-misc-fixes'
      Merge branch 'bpf-stacktrace-map-next-key-support'

Jakub Kicinski (12):
      bpf: offload: don't require rtnl for dev list manipulation
      bpf: offload: don't use prog->aux->offload as boolean
      bpf: offload: allow netdev to disappear while verifier is running
      bpf: offload: free prog->aux->offload when device disappears
      bpf: offload: free program id when device disappears
      nsfs: generalize ns_get_path() for path resolution with a task
      bpf: offload: report device information for offloaded programs
      tools: bpftool: report device information for offloaded programs
      selftests/bpf: test device info reporting for bound progs
      tools: bpftool: rename cgroup list -> show in the code
      tools: bpftool: alias show and list commands
      tools: bpftool: remove new lines from errors

Jesper Dangaard Brouer (14):
      xdp: base API for new XDP rx-queue info concept
      xdp/mlx5: setup xdp_rxq_info
      i40e: setup xdp_rxq_info
      ixgbe: setup xdp_rxq_info
      xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg
      mlx4: setup xdp_rxq_info
      bnxt_en: setup xdp_rxq_info
      nfp: setup xdp_rxq_info
      thunderx: setup xdp_rxq_info
      tun: setup xdp_rxq_info
      virtio_net: setup xdp_rxq_info
      xdp: generic XDP handling of xdp_rxq_info
      bpf: finally expose xdp_rxq_info to XDP bpf-programs
      samples/bpf: program demonstrating access to xdp_rxq_info

John Fastabend (2):
      bpf: sockmap remove unused function
      bpf: only build sockmap with CONFIG_INET

Roman Gushchin (2):
      tools/bpftool: use version from the kernel source tree
      tools/bpftool: fix bpftool build with bintutils >= 2.9

Yonghong Song (2):
      bpf: implement syscall command BPF_MAP_GET_NEXT_KEY for stacktrace map
      tools/bpf: add a bpf selftest for stacktrace

 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |  10 +
 drivers/net/ethernet/broadcom/bnxt/bnxt.h          |   2 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c      |   1 +
 drivers/net/ethernet/cavium/thunder/nicvf_main.c   |  11 +-
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c |   4 +
 drivers/net/ethernet/cavium/thunder/nicvf_queues.h |   2 +
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |   2 +
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  18 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        |   3 +
 drivers/net/ethernet/intel/ixgbe/ixgbe.h           |   2 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c   |   4 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |  10 +-
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c     |   3 +-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c         |  13 +-
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h       |   4 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h       |   4 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c  |   9 +
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    |   1 +
 drivers/net/ethernet/netronome/nfp/bpf/main.h      |   2 +-
 drivers/net/ethernet/netronome/nfp/bpf/verifier.c  |   2 +-
 drivers/net/ethernet/netronome/nfp/nfp_net.h       |   5 +-
 .../net/ethernet/netronome/nfp/nfp_net_common.c    |  10 +-
 drivers/net/ethernet/qlogic/qede/qede.h            |   2 +
 drivers/net/ethernet/qlogic/qede/qede_fp.c         |   1 +
 drivers/net/ethernet/qlogic/qede/qede_main.c       |  10 +
 drivers/net/netdevsim/bpf.c                        |   2 +-
 drivers/net/tun.c                                  |  24 +-
 drivers/net/virtio_net.c                           |  14 +-
 fs/nsfs.c                                          |  29 +-
 include/linux/bpf.h                                |  18 +-
 include/linux/bpf_types.h                          |   2 +-
 include/linux/bpf_verifier.h                       |  16 +-
 include/linux/filter.h                             |   2 +
 include/linux/netdevice.h                          |   6 +-
 include/linux/proc_ns.h                            |   3 +
 include/net/xdp.h                                  |  48 ++
 include/uapi/linux/bpf.h                           |   6 +
 kernel/bpf/Makefile                                |   2 +
 kernel/bpf/offload.c                               | 147 ++++--
 kernel/bpf/sockmap.c                               |   8 -
 kernel/bpf/stackmap.c                              |  28 +-
 kernel/bpf/syscall.c                               |  19 +-
 kernel/bpf/verifier.c                              |  20 +-
 net/core/Makefile                                  |   2 +-
 net/core/dev.c                                     |  69 ++-
 net/core/filter.c                                  |  19 +
 net/core/xdp.c                                     |  73 +++
 samples/bpf/Makefile                               |   4 +
 samples/bpf/xdp_rxq_info_kern.c                    |  96 ++++
 samples/bpf/xdp_rxq_info_user.c                    | 531 +++++++++++++++++++++
 tools/bpf/Makefile                                 |  29 ++
 tools/bpf/bpf_jit_disasm.c                         |   7 +
 tools/bpf/bpftool/Documentation/bpftool-cgroup.rst |   6 +-
 tools/bpf/bpftool/Documentation/bpftool-map.rst    |   6 +-
 tools/bpf/bpftool/Documentation/bpftool-prog.rst   |   6 +-
 tools/bpf/bpftool/Documentation/bpftool.rst        |   6 +-
 tools/bpf/bpftool/Makefile                         |  27 ++
 tools/bpf/bpftool/bash-completion/bpftool          |   8 +-
 tools/bpf/bpftool/cgroup.c                         |  35 +-
 tools/bpf/bpftool/common.c                         |  52 ++
 tools/bpf/bpftool/jit_disasm.c                     |   7 +
 tools/bpf/bpftool/main.c                           |  13 +-
 tools/bpf/bpftool/main.h                           |   2 +
 tools/bpf/bpftool/map.c                            |   3 +-
 tools/bpf/bpftool/prog.c                           |  10 +-
 tools/build/feature/Makefile                       |   4 +
 tools/build/feature/test-disassembler-four-args.c  |  15 +
 tools/include/uapi/linux/bpf.h                     |   3 +
 tools/testing/selftests/bpf/Makefile               |   2 +-
 tools/testing/selftests/bpf/test_offload.py        | 112 ++++-
 tools/testing/selftests/bpf/test_progs.c           | 127 +++++
 tools/testing/selftests/bpf/test_stacktrace_map.c  |  62 +++
 72 files changed, 1687 insertions(+), 178 deletions(-)
 create mode 100644 include/net/xdp.h
 create mode 100644 net/core/xdp.c
 create mode 100644 samples/bpf/xdp_rxq_info_kern.c
 create mode 100644 samples/bpf/xdp_rxq_info_user.c
 create mode 100644 tools/build/feature/test-disassembler-four-args.c
 create mode 100644 tools/testing/selftests/bpf/test_stacktrace_map.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ