summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-12-15 12:12:19 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-12-16 03:25:55 +0300
commite72d88d18df4e03c80e64c2535f70c64f1dc6fc1 (patch)
treeb40a94832096c09289083677044e0d6c61601927 /arch/x86/include
parent4f9087f16651aca4a5f32da840a53f6660f0579a (diff)
downloadlinux-e72d88d18df4e03c80e64c2535f70c64f1dc6fc1.tar.xz
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>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/cfi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cfi.h b/arch/x86/include/asm/cfi.h
index 7a7b0b823a98..8779abd217b7 100644
--- a/arch/x86/include/asm/cfi.h
+++ b/arch/x86/include/asm/cfi.h
@@ -106,6 +106,7 @@ struct pt_regs;
enum bug_trap_type handle_cfi_failure(struct pt_regs *regs);
#define __bpfcall
extern u32 cfi_bpf_hash;
+extern u32 cfi_bpf_subprog_hash;
static inline int cfi_get_offset(void)
{
@@ -128,6 +129,7 @@ static inline enum bug_trap_type handle_cfi_failure(struct pt_regs *regs)
return BUG_TRAP_TYPE_NONE;
}
#define cfi_bpf_hash 0U
+#define cfi_bpf_subprog_hash 0U
#endif /* CONFIG_CFI_CLANG */
#endif /* _ASM_X86_CFI_H */