From: Daniel Borkmann <daniel@iogearbox.net>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, eddyz87@gmail.com, info@starlabs.sg
Subject: [PATCH bpf-next 3/4] bpf: Remove static qualifier from local subprog pointer
Date: Wed, 8 Apr 2026 17:37:11 +0200 [thread overview]
Message-ID: <20260408153712.523124-3-daniel@iogearbox.net> (raw)
In-Reply-To: <20260408153712.523124-1-daniel@iogearbox.net>
The local subprog pointer in create_jt() and visit_abnormal_return_insn()
was declared static.
It is unconditionally assigned via bpf_find_containing_subprog() before
every use. Thus, the static qualifier serves no purpose and rather creates
confusion. Just remove it.
Fixes: e40f5a6bf88a ("bpf: correct stack liveness for tail calls")
Fixes: 493d9e0d6083 ("bpf, x86: add support for indirect jumps")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
kernel/bpf/verifier.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 46f55ea6684e..6cb54764d452 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -19224,7 +19224,7 @@ static struct bpf_iarray *jt_from_subprog(struct bpf_verifier_env *env,
static struct bpf_iarray *
create_jt(int t, struct bpf_verifier_env *env)
{
- static struct bpf_subprog_info *subprog;
+ struct bpf_subprog_info *subprog;
int subprog_start, subprog_end;
struct bpf_iarray *jt;
int i;
@@ -19299,7 +19299,7 @@ static int visit_gotox_insn(int t, struct bpf_verifier_env *env)
*/
static int visit_abnormal_return_insn(struct bpf_verifier_env *env, int t)
{
- static struct bpf_subprog_info *subprog;
+ struct bpf_subprog_info *subprog;
struct bpf_iarray *jt;
if (env->insn_aux_data[t].jt)
--
2.43.0
next prev parent reply other threads:[~2026-04-08 15:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 15:37 [PATCH bpf-next 1/4] bpf: Propagate error from visit_tailcall_insn Daniel Borkmann
2026-04-08 15:37 ` [PATCH bpf-next 2/4] bpf: Fix ld_{abs,ind} failure path analysis in subprogs Daniel Borkmann
2026-04-08 16:20 ` Alexei Starovoitov
2026-04-08 17:04 ` Daniel Borkmann
2026-04-08 17:47 ` Alexei Starovoitov
2026-04-08 18:47 ` Daniel Borkmann
2026-04-08 15:37 ` Daniel Borkmann [this message]
2026-04-08 16:21 ` [PATCH bpf-next 3/4] bpf: Remove static qualifier from local subprog pointer Anton Protopopov
2026-04-08 15:37 ` [PATCH bpf-next 4/4] selftests/bpf: Add tests for ld_{abs,ind} failure path in subprogs Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408153712.523124-3-daniel@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eddyz87@gmail.com \
--cc=info@starlabs.sg \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox