All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Protopopov <a.s.protopopov@gmail.com>
To: Xu Kuohai <xukuohai@huaweicloud.com>
Cc: Yonghong Song <yonghong.song@linux.dev>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Puranjay Mohan <puranjay@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH bpf-next v2] bpf: arm64: Fix panic due to missing BTI at indirect jump targets
Date: Thu, 25 Dec 2025 13:45:41 +0000	[thread overview]
Message-ID: <aU1ABRjEg7RQWub6@mail.gmail.com> (raw)
In-Reply-To: <4287f839-d713-44d5-afa0-918f2a44c5c3@huaweicloud.com>

On 25/12/25 07:46PM, Xu Kuohai wrote:
> On 12/25/2025 7:04 PM, Anton Protopopov wrote:
> 
> [...]
> 
> > > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> > > > index da6a00dd313f..a3a89d4b4dae 100644
> > > > --- a/include/linux/bpf.h
> > > > +++ b/include/linux/bpf.h
> > > > @@ -3875,13 +3875,32 @@ void bpf_insn_array_release(struct bpf_map *map);
> > > >    void bpf_insn_array_adjust(struct bpf_map *map, u32 off, u32 len);
> > > >    void bpf_insn_array_adjust_after_remove(struct bpf_map *map, u32 off, u32 len);
> > > > +enum bpf_insn_array_type {
> > > > +	BPF_INSN_ARRAY_VOID,
> > > 
> > > What is the purpose for BPF_INSN_ARRAY_VOID? Do we really need it?
> > 
> > There seems to be no need for a name for the default case,
> > but BPF_INSN_ARRAY_JUMP_TABLE should be != 0, so can be just
> > 
> > enum bpf_insn_array_type {
> > 	BPF_INSN_ARRAY_JUMP_TABLE = 1,
> > };
> > 
> 
> Having only BPF_INSN_ARRAY_JUMP_TABLE feels incomplete, since there
> would be no enum value to indicate an instruction array without a
> specific purpose, like the insn_arrays created in selftests [1].

Yes, but it is also never used explicitly, right?
The only usage is in "x != BPF_INSN_ARRAY_JUMP_TABLE".

> [1] https://lore.kernel.org/bpf/20251105090410.1250500-5-a.s.protopopov@gmail.com/
> 
> [...]
> 

  reply	other threads:[~2025-12-25 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23  8:54 [PATCH bpf-next v2] bpf: arm64: Fix panic due to missing BTI at indirect jump targets Xu Kuohai
2025-12-23 18:32 ` Yonghong Song
2025-12-25 11:04   ` Anton Protopopov
2025-12-25 11:46     ` Xu Kuohai
2025-12-25 13:45       ` Anton Protopopov [this message]
2025-12-26  5:10     ` Yonghong Song
2025-12-25 11:59   ` Xu Kuohai
2025-12-26  5:12     ` Yonghong Song

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=aU1ABRjEg7RQWub6@mail.gmail.com \
    --to=a.s.protopopov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=puranjay@kernel.org \
    --cc=will@kernel.org \
    --cc=xukuohai@huaweicloud.com \
    --cc=yonghong.song@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.