[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mb61pv7m92evu.fsf@gmail.com>
Date: Wed, 27 Aug 2025 11:16:53 +0000
From: Puranjay Mohan <puranjay12@...il.com>
To: Eduard Zingerman <eddyz87@...il.com>
Cc: KaFai Wan <kafai.wan@...ux.dev>, 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
Eduard Zingerman <eddyz87@...il.com> writes:
> 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?
I don't think that we need this test as it is based on a missing feature
in the JIT. Once the arm JIT is improved, this test will silently stop
testing what it is supposed to test (fallback to interpreter).
Thanks,
Puranjay
Powered by blists - more mailing lists