Re: [PATCH bpf v2 2/2] selftests/bpf: Add socket filter attach test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eduard Zingerman <eddyz87@xxxxxxxxx> 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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux