Re: [PATCH v2 pahole 2/2] btf_encoder: don't special case packed enums

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

 



Em Mon, Feb 25, 2019 at 05:19:27PM -0800, Andrii Nakryiko escreveu:
> BTF data can represent packed enums correctly without any special
> handling from pahole side. Previously pahole's own `enum vscope` would
> be omitted causing problems.
> 
> Original commit tried to generate correct struct bitfield member type if
> the member is an enum. This was dated before kind_flag implementation.
> Later, kind_flag support was added and now pahole always generates BTF
> with kind_flag = 1 for structures with bitfield, where bitfield size is
> encoded in btf_member, so this workaround is not needed any more.
> Removing this "hack" makes handling it easier to handle packed enums
> correctly.

<SNIP excellent repro before/after text>
 
> Fixes: b18354f64cc2 ("btf: Generate correct struct bitfield member types")
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
> Acked-by: Yonghong Song <yhs@xxxxxx>

Thanks a lot, tested it with vmlinux, libc, your repro, all working
jist fine, applied!

Now out to get a vmlinux for a different arch to check that as well.

- Arnaldo



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux