Re: [PATCH bpf-next v3 3/6] bpf: fix the usage of BPF_TRAMP_F_SKIP_FRAME

From: Andreas Schwab

Date: Fri Dec 19 2025 - 08:56:57 EST


On Dez 19 2025, Menglong Dong wrote:

> diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
> index 5f9457e910e8..09b70bf362d3 100644
> --- a/arch/riscv/net/bpf_jit_comp64.c
> +++ b/arch/riscv/net/bpf_jit_comp64.c
> @@ -1134,7 +1134,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im,
> store_args(nr_arg_slots, args_off, ctx);
>
> /* skip to actual body of traced function */
> - if (flags & BPF_TRAMP_F_ORIG_STACK)
> + if (flags & BPF_TRAMP_F_CALL_ORIG)
> orig_call += RV_FENTRY_NINSNS * 4;

There are now three occurrences of that condition, and only the third
one uses orig_call. How about merging them?

--
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."