[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4287f839-d713-44d5-afa0-918f2a44c5c3@huaweicloud.com>
Date: Thu, 25 Dec 2025 19:46:33 +0800
From: Xu Kuohai <xukuohai@...weicloud.com>
To: Anton Protopopov <a.s.protopopov@...il.com>,
Yonghong Song <yonghong.song@...ux.dev>
Cc: Xu Kuohai <xukuohai@...weicloud.com>, 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 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].
[1] https://lore.kernel.org/bpf/20251105090410.1250500-5-a.s.protopopov@gmail.com/
[...]
Powered by blists - more mailing lists