From: Quentin Monnet Subject: Re: [PATCH bpf-next] bpf: remove useless version check for prog load Date: Mon, 17 Dec 2018 09:39:47 +0000 Message-ID: <73da8b9f-133e-ee59-b8f5-740bfa083f8f@netronome.com> References: <20181215234947.18225-1-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: yhs@fb.com, kafai@fb.com, netdev@vger.kernel.org To: Daniel Borkmann , ast@kernel.org Return-path: Received: from mail-wr1-f67.google.com ([209.85.221.67]:44295 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbeLQJjv (ORCPT ); Mon, 17 Dec 2018 04:39:51 -0500 Received: by mail-wr1-f67.google.com with SMTP id z5so11497341wrt.11 for ; Mon, 17 Dec 2018 01:39:50 -0800 (PST) In-Reply-To: <20181215234947.18225-1-daniel@iogearbox.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 2018-12-16 00:49 UTC+0100 ~ Daniel Borkmann > Existing libraries and tracing frameworks work around this kernel > version check by automatically deriving the kernel version from > uname(3) or similar such that the user does not need to do it > manually; these workarounds also make the version check useless > at the same time. > > Moreover, most other BPF tracing types enabling bpf_probe_read()-like > functionality have /not/ adapted this check, and in general these > days it is well understood anyway that all the tracing programs are > not stable with regards to future kernels as kernel internal data > structures are subject to change from release to release. > > Back at last netconf we discussed [0] and agreed to remove this > check from bpf_prog_load() and instead document it here in the uapi > header that there is no such guarantee for stable API for these > programs. > > [0] http://vger.kernel.org/netconf2018_files/DanielBorkmann_netconf2018.pdf > > Signed-off-by: Daniel Borkmann > Acked-by: Alexei Starovoitov For what it's worth, Acked-by: Quentin Monnet Note: samples and selftests setting a kern_version can probably wait before being updated (if they get updated at all), but you might want to change now the remark in Documentation/bpf/bpf_design_QA.rst about kern_version being checked.