x86/cfi,bpf: Fix bpf_callback_t CFI
authorPeter Zijlstra <peterz@infradead.org>
Fri, 15 Dec 2023 09:12:19 +0000 (10:12 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 16 Dec 2023 00:25:55 +0000 (16:25 -0800)
commite72d88d18df4e03c80e64c2535f70c64f1dc6fc1
treeb40a94832096c09289083677044e0d6c61601927
parent4f9087f16651aca4a5f32da840a53f6660f0579a
x86/cfi,bpf: Fix bpf_callback_t CFI

Where the main BPF program is expected to match bpf_func_t,
sub-programs are expected to match bpf_callback_t.

This fixes things like:

tools/testing/selftests/bpf/progs/bloom_filter_bench.c:

           bpf_for_each_map_elem(&array_map, bloom_callback, &data, 0);

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231215092707.451956710@infradead.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/include/asm/cfi.h
arch/x86/kernel/alternative.c
arch/x86/net/bpf_jit_comp.c