[PATCH bpf-next v11 2/3] cfi: Move BPF CFI types and helpers to generic code

Will Deacon will at kernel.org
Mon Jul 21 07:33:46 PDT 2025


On Fri, Jul 18, 2025 at 10:33:48PM +0000, Sami Tolvanen wrote:
> 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 at google.com>
> ---
>  arch/riscv/include/asm/cfi.h  | 16 ------------
>  arch/riscv/kernel/cfi.c       | 24 ------------------
>  arch/x86/include/asm/cfi.h    | 10 ++------
>  arch/x86/kernel/alternative.c | 12 ---------
>  include/linux/cfi.h           | 47 +++++++++++++++++++++++++++++------
>  kernel/cfi.c                  | 15 +++++++++++
>  6 files changed, 56 insertions(+), 68 deletions(-)

Thanks, Sami, I like the look of this now.

If you can get the kbuild robot on board too, then I think we're good to
go!

Will



More information about the linux-arm-kernel mailing list