* [PATCH bpf-next 1/2] bpf: Simplify code with BPF_CALL_IMM
@ 2024-09-20 15:30 Tao Chen
0 siblings, 0 replies; only message in thread
From: Tao Chen @ 2024-09-20 15:30 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
Yonghong Song, Jiri Olsa
Cc: bpf, linux-kernel, Tao Chen
No logic changed, simplify code with BPF_CALL_IMM.
Signed-off-by: Tao Chen <chen.dylane@gmail.com>
---
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 53d0556fbbf3..26fe57c79f93 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -21157,7 +21157,7 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
func_id_name(insn->imm), insn->imm);
return -EFAULT;
}
- insn->imm = fn->func - __bpf_call_base;
+ insn->imm = BPF_CALL_IMM(fn->func);
next_insn:
if (subprogs[cur_subprog + 1].start == i + delta + 1) {
subprogs[cur_subprog].stack_depth += stack_depth_extra;
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-20 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 15:30 [PATCH bpf-next 1/2] bpf: Simplify code with BPF_CALL_IMM Tao Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox