Re: [PATCH bpf-next v2 1/2] bpf: Support private stack for bpf progs

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

 



On Wed, Jul 24, 2024 at 2:28 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
>
> > In the following branch I explored a way to add such capability:
> > https://github.com/eddyz87/bpf/tree/yhs-private-stack-plus-jit-testing
...
> > 0156b148b5b4 ("selftests/bpf: utility function to get program disassembly after jit")
..

> There are some differences like constant representation, e.g. jump offset hex number,
> gcc does not have '0x' prefix while clang has. Insn at 4b is also difference.
> But overall the difference is smaller.

There is certainly a difference in disasm libs that will be causing
miscompare with expected text.

Also not everyone has disasm enabled in bpftool.
In my setup:
$ bpftool prog dump jited id 1
Error: No JIT disassembly support

So we can enable such feature in selftests,
but it would have to skip the tests if bpftool is not built
with the right disasm library, hence the value of such
tests will be small.

It's probably better to make test_progs use
LLVMDisasm* directly and converge on that disasm style
assuming distros have this lib easily available.





[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