From: Daniel Borkmann Subject: [PATCH bpf 1/2] bpf, doc: update design qa to reflect kern_version requirement Date: Mon, 7 Jan 2019 22:57:17 +0100 Message-ID: <20190107215718.2902-2-daniel@iogearbox.net> References: <20190107215718.2902-1-daniel@iogearbox.net> Cc: netdev@vger.kernel.org, Daniel Borkmann To: ast@kernel.org Return-path: Received: from www62.your-server.de ([213.133.104.62]:42202 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbfAGV5f (ORCPT ); Mon, 7 Jan 2019 16:57:35 -0500 In-Reply-To: <20190107215718.2902-1-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: 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 Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- Documentation/bpf/bpf_design_QA.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/bpf/bpf_design_QA.rst b/Documentation/bpf/bpf_design_QA.rst index 6780a6d..7cc9e36 100644 --- a/Documentation/bpf/bpf_design_QA.rst +++ b/Documentation/bpf/bpf_design_QA.rst @@ -157,12 +157,11 @@ Q: Does BPF have a stable ABI? ------------------------------ A: YES. BPF instructions, arguments to BPF programs, set of helper functions and their arguments, recognized return codes are all part -of ABI. However when tracing programs are using bpf_probe_read() helper -to walk kernel internal datastructures and compile with kernel -internal headers these accesses can and will break with newer -kernels. The union bpf_attr -> kern_version is checked at load time -to prevent accidentally loading kprobe-based bpf programs written -for a different kernel. Networking programs don't do kern_version check. +of ABI. However there is one specific exception to tracing programs +which are using helpers like bpf_probe_read() to walk kernel internal +data structures and compile with kernel internal headers. Both of these +kernel internals are subject to change and can break with newer kernels +such that the program needs to be adapted accordingly. Q: How much stack space a BPF program uses? ------------------------------------------- -- 2.9.5