Article View: linux.kernel.netdev
Article #5143[PATCH bpf-next 2/3] bpf: Don't reference arena kfuncs when arena isn't built
From: Sasha Levin
Date: Mon, 19 Oct 2026 21:10
Date: Mon, 19 Oct 2026 21:10
48 lines
10208 bytes
10208 bytes
kernel/bpf/Makefile builds arena.o only for CONFIG_MMU && CONFIG_64BIT,
but special_kfunc_list references bpf_arena_alloc_pages() and
bpf_arena_free_pages() unconditionally, so on 32-bit and !MMU kernels
resolve_btfids can't resolve them:
WARN: resolve_btfids: unresolved symbol bpf_arena_free_pages
WARN: resolve_btfids: unresolved symbol bpf_arena_alloc_pages
Since commit 201a454df948 ("resolve_btfids: Fix the --fatal_warnings
exit status") these warnings fail the build with CONFIG_WERROR=y, which
breaks i386 builds with CONFIG_DEBUG_INFO_BTF=y:
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
Only reference them under the condition arena.o is built with, and use
BTF_ID_UNUSED otherwise to keep the list in sync with enum
special_kfunc_type. An unresolved ID is zero, like BTF_ID_UNUSED, so the
contents of the list don't change.
Fixes: b8467290edab ("bpf: arena: make arena kfuncs any context safe")
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/verifier.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 22f095b9dca2d..12229713a4528 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -13639,8 +13639,13 @@ BTF_ID(func, bpf_task_work_schedule_signal)
BTF_ID(func, bpf_task_work_schedule_resume)
BTF_ID(func, bpf_call_rcu)
BTF_ID(func, bpf_call_rcu_tasks_trace)
+#if defined(CONFIG_MMU) && defined(CONFIG_64BIT)
BTF_ID(func, bpf_arena_alloc_pages)
BTF_ID(func, bpf_arena_free_pages)
+#else
+BTF_ID_UNUSED
+BTF_ID_UNUSED
+#endif
#ifdef CONFIG_BPF_EVENTS
BTF_ID(func, bpf_session_is_return)
#else
--
2.53.0
Technical Details
Message-ID:
<20261019211006.2574350-3-sashal@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348848-linux-kernel-netdev=dewy.ruReferences:
<20261019211006.2574350-1-sashal@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348848-linux-kernel-netdev=dewy.ru From: sashal@kernel.org (Sasha Levin) Newsgroups: linux.kernel.netdev Subject: [PATCH bpf-next 2/3] bpf: Don't reference arena kfuncs when arena isn't built Date: Mon, 19 Oct 2026 17:10:05 -0400 Organization: Usenet Network Message-ID: <20261019211006.2574350-3-sashal@kernel.org> References: <20261019211006.2574350-1-sashal@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3714130"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:wJDOLXVk/CgqwYwfcGaDuFEZHO0= sha256:OKU/H36LQXtnltheXjrqCofyobYJYtpVevNDO9KC+GM= sha1:8axC5oAEI1VV1ijjiyhwxHuzaJU= sha256:8WjwZaDAuWWbzJSoQ1adXsOtP8T253RA17dp65tuY40= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id A2353110B2B; Tue, 20 Oct 2026 00:12:08 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.829 X-Spam-Status: No, score=-3.829 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.329, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IS_w5y2hlbmz; Tue, 20 Oct 2026 00:12:02 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-348848-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 102C0110B1E; Tue, 20 Oct 2026 00:11:53 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 8E67560DD68; Mon, 19 Oct 2026 21:10:35 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792444230; b=Mngb21eCYhhB4r3+myvoRWDEpPIOo8askBosOr6IdgYcbHbt+4kUdEb2a/eUXb2Rckqu hmj3TGOsou5uS7npFicQgSy7oHdjIDR2G0PJKuMFYfYczbcvF6wCocZVXU9SYHEIIpNqT is3WWJGsfAIHJIbW7pEKGVaooMNX5A4rc2SeOo8ad9hkrOKKoLyeWAN2VFT+1tsqw8viB GO+Z09hyYp6i2p/FEIqOstFQ0s5RU/qBdQZ+ggh/BFDknh0M4LmYoFA9ycAsP+Gka+0uH 3UgG2bdYOAyIo53fVmi+agWlcLUL7phCm2aoW/FqPOVUCIg9koMSBgIBqwXm+MPYzyA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792444230; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding; bh=YhI+AK81XLCtdL59lTKeYo77+ymjLGfVFWvDZPKBf20=; b=lC21mho2Jl44Vory5m6Y14K7TaE7M/laOoKdSoTFeBtyfK7BWxRF9cbzPbkyuBYY7MUX Jd0bDXVaEJQJEe6VyFPOSmuoWwxZGX97wJ6DAUwZAExaxvWdD22sl1Woukw/RlPKE8bPJ 3sK5AEOasqg+0TI7sApDayLrJz/CM6KFCuxw0bnp0jSRgEumu9lkvA2iNh9DH2ELH4yzR DPZH/NA86e0QpEhfghwNRAn+/tXkjT/4I7jfoZoNrYRhsExMF8xCzGVftw15kBRxKRU5R Em7i3rbq31UAL6kgyNz7H++UbOEGeonFDQiJMjy8MkFRc+upGoM3JmyZu2eiOJD+tDA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="nM/SRvyV"; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CB4C606A32D; Mon, 19 Oct 2026 21:10:30 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nM/SRvyV X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792444217; b=4Q2oYogUAcN49iEaV1PV6eXVWgd7N+5jYyn5rVn+/3c6NbnYPl/66vn7a+rKh2D3xTxE MRegQ/U6sIii3I7MXhr4IoX6eh2RhabAOjdDbyIyfDF6RppPPfGMcfp63nvW5lbb7bAV2 V3qXEPvLO2/2RFs+8G73HCgNEEOEp4BpeG8fZeGwpVoR/IxbCjSKHBdAwmZlM4jMKo0I5 0un5p26Cf9UdegYgDTd+GfRYiU7mc2MoeCD/i4peLxIf37a4TOFw7NleoN/h5xopuTWak ZLUhk7gjGGK4VcecOz3RAqoY/2GIC8t+HPHoR3ft9Ofui3xj45IJ/lPp0w8JhVQUf7Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792444217; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=YhI+AK81XLCtdL59lTKeYo77+ymjLGfVFWvDZPKBf20=; b=l2GqnaWTfRFiYUzONcPyGubiSTNMBDm04xxNyURnwBKKRZcMks7OzMQlitKE/bQcn9kh xFHszqvGKF9HWl4Ft84UDwmkhWJdP4Uh+QFN+f144tcQjRzAeS7TM5yj1WL1ffWCX8UHA aqsZdPTvG+P+WRTs8bgU7vqACO3r4/OHtxNzFYbfhQlMuN2l5U/aUC5L8rZVyd3k4OpF6 PP38l2ARWsY6Kxg6/EZDiWu9Vwz+2xhb7IUJtFtTlWdiJmeyGjq1cJykxIm/erxJFV/9k BtrqZQPThwDNCpdZ7YYawDPYkH+nM3Z9NZntppbNuhfRNKSOMi+5DmuOzkEnEBOeMxw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="nM/SRvyV"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 145D8606A323; Mon, 19 Oct 2026 21:10:16 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CB8C1F000C4; Mon, 19 Oct 2026 21:10:13 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792444216; bh=YhI+AK81XLCtdL59lTKeYo77+ymjLGfVFWvDZPKBf20=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nM/SRvyVZ0Gv8bi/pylE2bHe1ifDVtvl4k47e5rRHluJ8VOQLN3jt+ABrt38eQ33M FXDF8sYE1K3r+b4ZR8nU8K7kuQ5w01I+F0jvSHdBU53NUxe/QeoAoqvQ4ZbuNQn+x5 Q/lvGGQFBjlUsr4ZSrHG5CbJpQZVwYwNJITvdhS90rgk9HSMKU1yQglMCx66M//xUE 8AsGNQ7BK0biQfnpLVRv7E/RTy3yGgKDiX6kdB5FDZ2zhQ7UFXyxXwnhBmjFhPTqdy gLSXPteD5SbW7ja0Z1JSN5nX4G1x/h3NEhUqx10LVxzfNSG92kse3HSavti3qBw1Sd LfuAIcIl8xhmw== X-Cc: Sasha Levin <sashal@kernel.org>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Eduard Zingerman <eddyz87@gmail.com>, Kumar Kartikeya Dwivedi <memxor@gmail.com>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yonghong.song@linux.dev>, Jiri Olsa <jolsa@kernel.org>, Emil Tsalapatis <emil@etsalapatis.com>, Ihor Solodrai <ihor.solodrai@linux.dev>, Eric Dumazet <edumazet@kernel.org>, Kuniyuki Iwashima <kuniyu@google.com>, Paolo Abeni <pabeni@redhat.com>, Willem de Bruijn <willemb@google.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>, Amery Hung <ameryhung@gmail.com>, Puranjay Mohan <puranjay@kernel.org>, Stanislav Fomichev <sdf@fomichev.me>, Mahe Tardy <mahe.tardy@gmail.com>, Jiayuan Chen <jiayuan.chen@linux.dev>, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Petr Pavlu <petr.pavlu@suse.com>, Leon Hwang <leon.hwang@linux.dev> X-Mailer: git-send-email 2.53.0 X-In-Reply-To: <20261019211006.2574350-1-sashal@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list