lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aU1ABRjEg7RQWub6@mail.gmail.com>
Date: Thu, 25 Dec 2025 13:45:41 +0000
From: Anton Protopopov <a.s.protopopov@...il.com>
To: Xu Kuohai <xukuohai@...weicloud.com>
Cc: Yonghong Song <yonghong.song@...ux.dev>, bpf@...r.kernel.org,
	linux-kernel@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Andrii Nakryiko <andrii@...nel.org>,
	Martin KaFai Lau <martin.lau@...ux.dev>,
	Eduard Zingerman <eddyz87@...il.com>,
	Puranjay Mohan <puranjay@...nel.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>
Subject: Re: [PATCH bpf-next v2] bpf: arm64: Fix panic due to missing BTI at
 indirect jump targets

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/
> 
> [...]
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ