Skip to content

Commit

Permalink
s64ilp32: ebpf_jit: Fix some cases of test_bpf that cannot be execute…
Browse files Browse the repository at this point in the history
…d by BPF_JIT

test_bpf: #6 LD_IND
bpf-jit: target offset 0x10872ffce is out of range
jited:0 2164 1381 1477 PASS
test_bpf: Summary: 1 PASSED, 0 FAILED, [0/1 JIT'ed]

Signed-off-by: Chen Pei <[email protected]>
  • Loading branch information
cp0613 authored and guoren83 committed Mar 22, 2024
1 parent d8b9041 commit a51c9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/net/bpf_jit_comp64.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static int emit_call(u64 addr, bool fixed_addr, struct rv_jit_context *ctx)
* Use the ro_insns(RX) to calculate the offset as the BPF
* program will finally run from this memory region.
*/
ip = (u64)(long)(ctx->ro_insns + ctx->ninsns);
ip = (u64)(unsigned long)(ctx->ro_insns + ctx->ninsns);
off = addr - ip;
}

Expand Down

0 comments on commit a51c9df

Please sign in to comment.