Message ID | 20230222223714.80671-7-iii@linux.ibm.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | bpf: Support 64-bit pointers to kfuncs | expand |
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c index 0a3c18e39199..6c482685dc6c 100644 --- a/arch/sparc/net/bpf_jit_comp_64.c +++ b/arch/sparc/net/bpf_jit_comp_64.c @@ -856,6 +856,7 @@ static void emit_tail_call(struct jit_ctx *ctx) ctx->saw_tail_call = true; + emit_alu_K(SRL, bpf_index, 0, ctx); off = offsetof(struct bpf_array, map.max_entries); emit(LD32 | IMMED | RS1(bpf_array) | S13(off) | RD(tmp), ctx); emit_cmp(bpf_index, tmp, ctx);
The interpreter does the following: u32 index = BPF_R3; and JITs should do the same. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- arch/sparc/net/bpf_jit_comp_64.c | 1 + 1 file changed, 1 insertion(+)