On Wed, Feb 22, 2023 at 11:37:10PM +0100, Ilya Leoshkevich wrote: > Preparation for moving kfunc address from bpf_insn.imm. > > Cc: David S. Miller <davem@xxxxxxxxxxxxx> > Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx> > --- > arch/sparc/net/bpf_jit_comp_64.c | 20 ++++++++++++++------ > arch/x86/net/bpf_jit_comp32.c | 7 +++++++ > 2 files changed, 21 insertions(+), 6 deletions(-) > > diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c > index 6c482685dc6c..b23083776718 100644 > --- a/arch/sparc/net/bpf_jit_comp_64.c > +++ b/arch/sparc/net/bpf_jit_comp_64.c > @@ -893,7 +893,8 @@ static void emit_tail_call(struct jit_ctx *ctx) > emit_nop(ctx); > } > SNIP > diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c > index 429a89c5468b..0abb4d6c9dec 100644 > --- a/arch/x86/net/bpf_jit_comp32.c > +++ b/arch/x86/net/bpf_jit_comp32.c > @@ -2091,6 +2091,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, > if (insn->src_reg == BPF_PSEUDO_CALL) > goto notyet; > > + err = bpf_jit_get_func_addr(bpf_prog, insn, extra_pass, > + &func_addr, > + &func_addr_fixed); > + if (err) > + return err; > + func = (u8 *)(unsigned long)func_addr; > + > if (insn->src_reg == BPF_PSEUDO_KFUNC_CALL) { > int err; looks like this hunk should be in: bpf, x86_32: Use bpf_jit_get_func_addr jirka