[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <139bf7d77750fdf04d26e1a77c0955466c9a4827.camel@gmail.com>
Date: Mon, 25 Aug 2025 12:32:29 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Puranjay Mohan <puranjay12@...il.com>
Cc: KaFai Wan <kafai.wan@...ux.dev>, puranjay@...nel.org,
xukuohai@...weicloud.com, ast@...nel.org, daniel@...earbox.net,
john.fastabend@...il.com, andrii@...nel.org, martin.lau@...ux.dev,
song@...nel.org, yonghong.song@...ux.dev, kpsingh@...nel.org,
sdf@...ichev.me, haoluo@...gle.com, jolsa@...nel.org, mykolal@...com,
shuah@...nel.org, mrpre@....com, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf v2 2/2] selftests/bpf: Add socket filter attach test
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
Powered by blists - more mailing lists