]> Git Repo - linux.git/commit
x86/cfi,bpf: Fix bpf_struct_ops CFI
authorPeter Zijlstra <[email protected]>
Fri, 15 Dec 2023 09:12:20 +0000 (10:12 +0100)
committerAlexei Starovoitov <[email protected]>
Sat, 16 Dec 2023 00:25:55 +0000 (16:25 -0800)
commit2cd3e3772e41377f32d6eea643e0590774e9187c
tree6731bd8786a091dbf2e2447952df2b5d908efec6
parente72d88d18df4e03c80e64c2535f70c64f1dc6fc1
x86/cfi,bpf: Fix bpf_struct_ops CFI

BPF struct_ops uses __arch_prepare_bpf_trampoline() to write
trampolines for indirect function calls. These tramplines much have
matching CFI.

In order to obtain the correct CFI hash for the various methods, add a
matching structure that contains stub functions, the compiler will
generate correct CFI which we can pilfer for the trampolines.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
arch/x86/include/asm/cfi.h
arch/x86/kernel/alternative.c
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h
kernel/bpf/bpf_struct_ops.c
net/bpf/bpf_dummy_struct_ops.c
net/ipv4/bpf_tcp_ca.c
This page took 0.070381 seconds and 4 git commands to generate.