cfi: Move BPF CFI types and helpers to generic code
authorSami Tolvanen <samitolvanen@google.com>
Fri, 1 Aug 2025 00:10:07 +0000 (00:10 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 1 Aug 2025 01:23:53 +0000 (18:23 -0700)
commitf1befc82addda926c8301436123d041bf3249505
treea3162e0378828eeb67248d6061473e16566fdf8b
parent5ccaeedb489b41ce6cb857d0de488992746be282
cfi: Move BPF CFI types and helpers to generic code

Instead of duplicating the same code for each architecture, move
the CFI type hash variables for BPF function types and related
helper functions to generic CFI code, and allow architectures to
override the function definitions if needed.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20250801001004.1859976-7-samitolvanen@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/riscv/include/asm/cfi.h
arch/riscv/kernel/cfi.c
arch/x86/include/asm/cfi.h
arch/x86/kernel/alternative.c
include/linux/cfi.h
kernel/cfi.c