From: Anton Protopopov <a.s.protopopov@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf@vger.kernel.org, ast@kernel.org, eddyz87@gmail.com, info@starlabs.sg
Subject: Re: [PATCH bpf-next 3/4] bpf: Remove static qualifier from local subprog pointer
Date: Wed, 8 Apr 2026 16:21:20 +0000 [thread overview]
Message-ID: <adaAgGjs3TbKnXsS@mail.gmail.com> (raw)
In-Reply-To: <20260408153712.523124-3-daniel@iogearbox.net>
On 26/04/08 05:37PM, Daniel Borkmann wrote:
> 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;
I wonder where I copy-pasted this from... Thanks!
Acked-by: Anton Protopopov <a.s.protopopov@gmail.com>
> 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 16:12 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 ` [PATCH bpf-next 3/4] bpf: Remove static qualifier from local subprog pointer Daniel Borkmann
2026-04-08 16:21 ` Anton Protopopov [this message]
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=adaAgGjs3TbKnXsS@mail.gmail.com \
--to=a.s.protopopov@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--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