Re: [PATCH bpf-next v2] bpf: arm64: Fix panic due to missing BTI at indirect jump targets

From: Xu Kuohai
Date: Thu Dec 25 2025 - 06:47:11 EST


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@xxxxxxxxx/

[...]