Re: [PATCH bpf-next 1/1] riscv64/cfi,bpf: Support kCFI + BPF on riscv64

From: Pu Lehui
Date: Thu Mar 07 2024 - 08:38:03 EST



On 2024/3/4 1:02, Puranjay Mohan wrote:
The riscv BPF JIT doesn't emit proper kCFI prologues for BPF programs

[SNIP]

-void bpf_jit_build_prologue(struct rv_jit_context *ctx)
+void bpf_jit_build_prologue(struct rv_jit_context *ctx, bool is_subprog)

Not tracked in time. Some nits, although it has been merged. We don't need to add new parameters here since we can fetch prog in ctx. Others, it looks great.

{
int i, stack_adjust = 0, store_offset, bpf_stack_adjust;
@@ -1740,6 +1749,9 @@ void bpf_jit_build_prologue(struct rv_jit_context *ctx)
store_offset = stack_adjust - 8;