@@ -35,23 +35,32 @@ Table : Subdirectories in /proc/sys/net
3535bpf_jit_enable
3636--------------
3737
38- This enables Berkeley Packet Filter Just in Time compiler.
39-
40- There are two flavors of JIT, the new eBPF JIT supported on:
38+ This enables the BPF Just in Time (JIT) compiler. BPF is a flexible
39+ and efficient infrastructure allowing to execute bytecode at various
40+ hook points. It is used in a number of Linux kernel subsystems such
41+ as networking (e.g. XDP, tc), tracing (e.g. kprobes, uprobes, tracepoints)
42+ and security (e.g. seccomp). LLVM has a BPF back end that can compile
43+ restricted C into a sequence of BPF instructions. After program load
44+ through bpf(2) and passing a verifier in the kernel, a JIT will then
45+ translate these BPF proglets into native CPU instructions. There are
46+ two flavors of JITs, the newer eBPF JIT currently supported on:
4147 - x86_64
4248 - arm64
4349 - ppc64
4450 - sparc64
4551 - mips64
4652
47- And the older cBPF JIT supported on:
53+ And the older cBPF JIT supported on the following archs :
4854 - arm
4955 - mips
5056 - ppc
5157 - sparc
5258
53- The BPF JIT provides a framework to speed packet filtering, the one used by
54- tcpdump/libpcap for example.
59+ eBPF JITs are a superset of cBPF JITs, meaning the kernel will
60+ migrate cBPF instructions into eBPF instructions and then JIT
61+ compile them transparently. Older cBPF JITs can only translate
62+ tcpdump filters, seccomp rules, etc, but not mentioned eBPF
63+ programs loaded through bpf(2).
5564
5665Values :
5766 0 - disable the JIT (default value)
@@ -61,9 +70,9 @@ Values :
6170bpf_jit_harden
6271--------------
6372
64- This enables hardening for the Berkeley Packet Filter Just in Time compiler.
65- Supported are eBPF JIT backends. Enabling hardening trades off performance,
66- but can mitigate JIT spraying.
73+ This enables hardening for the BPF JIT compiler. Supported are eBPF
74+ JIT backends. Enabling hardening trades off performance, but can
75+ mitigate JIT spraying.
6776Values :
6877 0 - disable JIT hardening (default value)
6978 1 - enable JIT hardening for unprivileged users only
@@ -72,11 +81,11 @@ Values :
7281bpf_jit_kallsyms
7382----------------
7483
75- When Berkeley Packet Filter Just in Time compiler is enabled, then compiled
76- images are unknown addresses to the kernel, meaning they neither show up in
77- traces nor in /proc/kallsyms. This enables export of these addresses, which
78- can be used for debugging/tracing. If bpf_jit_harden is enabled, this feature
79- is disabled.
84+ When BPF JIT compiler is enabled, then compiled images are unknown
85+ addresses to the kernel, meaning they neither show up in traces nor
86+ in /proc/kallsyms. This enables export of these addresses, which can
87+ be used for debugging/tracing. If bpf_jit_harden is enabled, this
88+ feature is disabled.
8089Values :
8190 0 - disable JIT kallsyms export (default value)
8291 1 - enable JIT kallsyms export for privileged users only
0 commit comments