Commit 710618c7 authored by Puranjay Mohan's avatar Puranjay Mohan Committed by Alexei Starovoitov
Browse files

arm64/cfi,bpf: Support kCFI + BPF on arm64



Currently, bpf_dispatcher_*_func() is marked with `__nocfi` therefore
calling BPF programs from this interface doesn't cause CFI warnings.

When BPF programs are called directly from C: from BPF helpers or
struct_ops, CFI warnings are generated.

Implement proper CFI prologues for the BPF programs and callbacks and
drop __nocfi for arm64. Fix the trampoline generation code to emit kCFI
prologue when a struct_ops trampoline is being prepared.

Signed-off-by: default avatarPuranjay Mohan <puranjay12@gmail.com>
Co-developed-by: default avatarMaxwell Bland <mbland@motorola.com>
Signed-off-by: default avatarMaxwell Bland <mbland@motorola.com>
Co-developed-by: default avatarSami Tolvanen <samitolvanen@google.com>
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
Tested-by: default avatarDao Huang <huangdao1@oppo.com>
Acked-by: default avatarWill Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250801001004.1859976-8-samitolvanen@google.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent f1befc82
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment