Re: [PATCH bpf-next v3 0/2] Fix btf dump error caused by declaration

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

 



On 2022/3/1 9:31, Andrii Nakryiko wrote:
On Thu, Feb 24, 2022 at 3:59 AM Xu Kuohai <xukuohai@xxxxxxxxxx> wrote:

This series fixes a btf dump error caused by forward declaration.

Currently if a declaration appears in the BTF before the definition,
the definition is dumped as a conflicting name, eg:

     $ bpftool btf dump file vmlinux format raw | grep "'unix_sock'"
     [81287] FWD 'unix_sock' fwd_kind=struct
     [89336] STRUCT 'unix_sock' size=1024 vlen=14

     $ bpftool btf dump file vmlinux format c | grep "struct unix_sock"
     struct unix_sock;
     struct unix_sock___2 {      <--- conflict, the "___2" is unexpected
                     struct unix_sock___2 *unix_sk;

This causes a "definition not found" compilation error if the dump output
is used as a header file.


seems like I replied about test failures on v2 instead of v3 (there
are test failures for v3, though), please check the link in that
reply. But I wanted to also mention that it would be great to keep a
succinct version log in the cover letter with what was changed or
fixed between versions (see other submissions on the mailing list).


Sorry for not describing the change log clearly, will add it in the v4.




[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