On Mon, Feb 1, 2021 at 9:23 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote: > On Mon, Feb 01, 2021 at 03:50:22PM +0100, Jiri Olsa wrote: > > SNIP > > > > > > > > > with Arnaldo's fixes I see less struct duplications, > > > > but still there's some > > > > > > > > > > > > > > I uploaded the build log from linking part to: > > > > > http://people.redhat.com/~jolsa/build.out.gz > > > > > > > > however looks like we don't handle DW_FORM_implicit_const > > > > when counting the byte offset.. it was used for some struct > > > > members in my vmlinux, so we got zero for byte offset and > > > > that created another unique struct > > > > > > > > with patch below I no longer see any struct duplication, > > > > also test_verifier_log is working for me, but I could > > > > not reproduce the error before > > > > > > > > I'll post full dwarves patch after some more testing > > > > > > > > also I wonder we could somehow use btf_check_all_metas > > > > from kernel after we build BTF data, that'd help to catch > > > > this earlier/easier ;-) I'll check on this > > > > > > Seems like a good idea indeed :-) > > > > > > I'm applying the patch below with your Signed-off-by, etc, ok? > > > > ok, thanks > > Paul, Ondrej, > > I put all the recent fixes and made a scratch build: > https://koji.fedoraproject.org/koji/taskinfo?taskID=61049457 > > if you have a chance to test and check your issue was resolved, > that'd be great I just built the current master branch of dwarves (d783117162c0, which includes Jirka's patch) [1] in COPR [2] and then rebuilt the kernel with it [3]. With the new dwarves, the issue seems to be fixed - /sys/kernel/btf/vmlinux is back to ~4MB and the selinux-testsuite BPF subtest passes. Thanks everyone for getting to the bottom of this! Hoping to see an updated dwarves in rawhide soon ;) [1] https://github.com/acmel/dwarves/ [2] https://copr.fedorainfracloud.org/coprs/omos/kernel-btf-test/build/1930103/ [3] https://copr.fedorainfracloud.org/coprs/omos/kernel-btf-test/build/1930104/ -- Ondrej Mosnacek Software Engineer, Platform Security - SELinux kernel Red Hat, Inc.