Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bpf, doc: update design qa to reflect kern_version requirement

Update the bpf_design_QA.rst to also reflect recent changes in
6c4fc209fcf9 ("bpf: remove useless version check for prog load").

Suggested-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Daniel Borkmann and committed by
Alexei Starovoitov
a769fa72 a8911d6d

+5 -6
+5 -6
Documentation/bpf/bpf_design_QA.rst
··· 157 157 ------------------------------ 158 158 A: YES. BPF instructions, arguments to BPF programs, set of helper 159 159 functions and their arguments, recognized return codes are all part 160 - of ABI. However when tracing programs are using bpf_probe_read() helper 161 - to walk kernel internal datastructures and compile with kernel 162 - internal headers these accesses can and will break with newer 163 - kernels. The union bpf_attr -> kern_version is checked at load time 164 - to prevent accidentally loading kprobe-based bpf programs written 165 - for a different kernel. Networking programs don't do kern_version check. 160 + of ABI. However there is one specific exception to tracing programs 161 + which are using helpers like bpf_probe_read() to walk kernel internal 162 + data structures and compile with kernel internal headers. Both of these 163 + kernel internals are subject to change and can break with newer kernels 164 + such that the program needs to be adapted accordingly. 166 165 167 166 Q: How much stack space a BPF program uses? 168 167 -------------------------------------------