summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-08-18 11:11:06 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-18 14:00:41 -0400
commit2110ba58303f0c2a03360c5f81fbe67ed312e7b9 (patch)
treeed5b08bc788e8d52ef9fd9d91735444b088cbfa4
parenta120d9ab65354727559b9db75ded8071b7ef19e2 (diff)
bpf, doc: improve sysctl knob description
Current context speaking of tcpdump filters is out of date these days, so lets improve the sysctl description for the BPF knobs a bit. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--Documentation/sysctl/net.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index b9c3c6078010..d7c2b88b92ae 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -35,23 +35,32 @@ Table : Subdirectories in /proc/sys/net
35bpf_jit_enable 35bpf_jit_enable
36-------------- 36--------------
37 37
38This enables Berkeley Packet Filter Just in Time compiler. 38This enables the BPF Just in Time (JIT) compiler. BPF is a flexible
39 39and efficient infrastructure allowing to execute bytecode at various
40There are two flavors of JIT, the new eBPF JIT supported on: 40hook points. It is used in a number of Linux kernel subsystems such
41as networking (e.g. XDP, tc), tracing (e.g. kprobes, uprobes, tracepoints)
42and security (e.g. seccomp). LLVM has a BPF back end that can compile
43restricted C into a sequence of BPF instructions. After program load
44through bpf(2) and passing a verifier in the kernel, a JIT will then
45translate these BPF proglets into native CPU instructions. There are
46two flavors of JITs, the newer eBPF JIT currently supported on:
41 - x86_64 47 - x86_64
42 - arm64 48 - arm64
43 - ppc64 49 - ppc64
44 - sparc64 50 - sparc64
45 - mips64 51 - mips64
46 52
47And the older cBPF JIT supported on: 53And the older cBPF JIT supported on the following archs:
48 - arm 54 - arm
49 - mips 55 - mips
50 - ppc 56 - ppc
51 - sparc 57 - sparc
52 58
53The BPF JIT provides a framework to speed packet filtering, the one used by 59eBPF JITs are a superset of cBPF JITs, meaning the kernel will
54tcpdump/libpcap for example. 60migrate cBPF instructions into eBPF instructions and then JIT
61compile them transparently. Older cBPF JITs can only translate
62tcpdump filters, seccomp rules, etc, but not mentioned eBPF
63programs loaded through bpf(2).
55 64
56Values : 65Values :
57 0 - disable the JIT (default value) 66 0 - disable the JIT (default value)
@@ -61,9 +70,9 @@ Values :
61bpf_jit_harden 70bpf_jit_harden
62-------------- 71--------------
63 72
64This enables hardening for the Berkeley Packet Filter Just in Time compiler. 73This enables hardening for the BPF JIT compiler. Supported are eBPF
65Supported are eBPF JIT backends. Enabling hardening trades off performance, 74JIT backends. Enabling hardening trades off performance, but can
66but can mitigate JIT spraying. 75mitigate JIT spraying.
67Values : 76Values :
68 0 - disable JIT hardening (default value) 77 0 - disable JIT hardening (default value)
69 1 - enable JIT hardening for unprivileged users only 78 1 - enable JIT hardening for unprivileged users only
@@ -72,11 +81,11 @@ Values :
72bpf_jit_kallsyms 81bpf_jit_kallsyms
73---------------- 82----------------
74 83
75When Berkeley Packet Filter Just in Time compiler is enabled, then compiled 84When BPF JIT compiler is enabled, then compiled images are unknown
76images are unknown addresses to the kernel, meaning they neither show up in 85addresses to the kernel, meaning they neither show up in traces nor
77traces nor in /proc/kallsyms. This enables export of these addresses, which 86in /proc/kallsyms. This enables export of these addresses, which can
78can be used for debugging/tracing. If bpf_jit_harden is enabled, this feature 87be used for debugging/tracing. If bpf_jit_harden is enabled, this
79is disabled. 88feature is disabled.
80Values : 89Values :
81 0 - disable JIT kallsyms export (default value) 90 0 - disable JIT kallsyms export (default value)
82 1 - enable JIT kallsyms export for privileged users only 91 1 - enable JIT kallsyms export for privileged users only