On Mon, 2025-08-25 at 21:27 +0200, Puranjay Mohan wrote:

[...]

> Hi Eduard,
> 
> You were right, I have verified that the program is hitting the 0xfff
> boundary while doing the call to bpf_skb_load_helper_32
> While jiting this call, emit_a32_mov_i(tmp[1], func, ctx); is called,
> where this issue it triggered.
> 
> The offset in imm_offset() is calculated as:
> ctx->offsets[ctx->prog->len - 1] * 4 + ctx->prologue_bytes +
> ctx->epilogue_bytes + imm_i * 4
> 
> For this program, ctx->offsets[ctx->prog->len - 1] * 4 itself is
> 0x1400 which is above 0xfff boundary.
> So, this is not a bug and expected behaviour with the current
> implementation of the JIT.
> 
> For now, we can merge this and later I will try to improve the JIT so
> it works for bigger programs.

Hi Puranjay,

Thank you for checking this!
What do you think about this test case, do we need it in the suite?

Best regards,
Eduard

Reply via email to