Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e90b1fd8 authored by David S. Miller's avatar David S. Miller
Browse files


Daniel Borkmann says:

====================
pull-request: bpf-next 2019-02-07

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

The main changes are:

1) Add a riscv64 JIT for BPF, from Björn.

2) Implement BTF deduplication algorithm for libbpf which takes BTF type
   information containing duplicate per-compilation unit information and
   reduces it to an equivalent set of BTF types with no duplication and
   without loss of information, from Andrii.

3) Offloaded and native BPF XDP programs can coexist today, enable also
   offloaded and generic ones as well, from Jakub.

4) Expose various BTF related helper functions in libbpf as API which
   are in particular helpful for JITed programs, from Yonghong.

5) Fix the recently added JMP32 code emission in s390x JIT, from Heiko.

6) Fix BPF kselftests' tcp_{server,client}.py to be able to run inside
   a network namespace, also add a fix for libbpf to get libbpf_print()
   working, from Stanislav.

7) Fixes for bpftool documentation, from Prashant.

8) Type cleanup in BPF kselftests' test_maps.c to silence a gcc8 warning,
   from Breno.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 907bea9c dd9cef43
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -464,10 +464,11 @@ breakpoints: 0 1
JIT compiler
------------

The Linux kernel has a built-in BPF JIT compiler for x86_64, SPARC, PowerPC,
ARM, ARM64, MIPS and s390 and can be enabled through CONFIG_BPF_JIT. The JIT
compiler is transparently invoked for each attached filter from user space
or for internal kernel users if it has been previously enabled by root:
The Linux kernel has a built-in BPF JIT compiler for x86_64, SPARC,
PowerPC, ARM, ARM64, MIPS, RISC-V and s390 and can be enabled through
CONFIG_BPF_JIT. The JIT compiler is transparently invoked for each
attached filter from user space or for internal kernel users if it has
been previously enabled by root:

  echo 1 > /proc/sys/net/core/bpf_jit_enable

@@ -603,9 +604,10 @@ got from bpf_prog_create(), and 'ctx' the given context (e.g.
skb pointer). All constraints and restrictions from bpf_check_classic() apply
before a conversion to the new layout is being done behind the scenes!

Currently, the classic BPF format is being used for JITing on most 32-bit
architectures, whereas x86-64, aarch64, s390x, powerpc64, sparc64, arm32 perform
JIT compilation from eBPF instruction set.
Currently, the classic BPF format is being used for JITing on most
32-bit architectures, whereas x86-64, aarch64, s390x, powerpc64,
sparc64, arm32, riscv (RV64G) perform JIT compilation from eBPF
instruction set.

Some core changes of the new internal format:

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ two flavors of JITs, the newer eBPF JIT currently supported on:
  - sparc64
  - mips64
  - s390x
  - riscv

And the older cBPF JIT supported on the following archs:
  - mips
+6 −0
Original line number Diff line number Diff line
@@ -2907,6 +2907,12 @@ L: netdev@vger.kernel.org
S:	Maintained
F:	arch/powerpc/net/

BPF JIT for RISC-V (RV64G)
M:	Björn Töpel <bjorn.topel@gmail.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	arch/riscv/net/

BPF JIT for S390
M:	Martin Schwidefsky <schwidefsky@de.ibm.com>
M:	Heiko Carstens <heiko.carstens@de.ibm.com>
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ config RISCV
	select RISCV_TIMER
	select GENERIC_IRQ_MULTI_HANDLER
	select ARCH_HAS_PTE_SPECIAL
	select HAVE_EBPF_JIT if 64BIT

config MMU
	def_bool y
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ KBUILD_IMAGE := $(boot)/Image.gz

head-y := arch/riscv/kernel/head.o

core-y += arch/riscv/kernel/ arch/riscv/mm/
core-y += arch/riscv/kernel/ arch/riscv/mm/ arch/riscv/net/

libs-y += arch/riscv/lib/

Loading