bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: 5:11: in-kernel BTF is malformed
Date: Wed, 3 Feb 2021 18:04:59 -0800	[thread overview]
Message-ID: <CAEf4Bza4XQxpS7VTNWGk6Rz-iUwZemF6+iAVBA_yvrWnV0k8Qg@mail.gmail.com> (raw)
In-Reply-To: <CAJCQCtQfgRp78_WSrSHLNUUYNCyOCH=vo10nVZW_cyMjpZiNJg@mail.gmail.com>

On Wed, Feb 3, 2021 at 5:21 PM Chris Murphy <lists@colorremedies.com> wrote:
>
> On Wed, Feb 3, 2021 at 6:00 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > Em Wed, Feb 03, 2021 at 05:46:48PM -0700, Chris Murphy escreveu:
> > > This is just the vmlinuz-5.11.0-0.rc6.141.fc34.x86_64 file
> > >
> > > https://drive.google.com/file/d/1G_2qLVRIy-ExaJI1-cTqDssrDu3sWo-m/view?usp=sharing
> >
> > Can you please provide the vmlinux for this file as well?
>
> Used this
> $ /usr/src/kernels/5.11.0-0.rc6.141.fc34.x86_64/scripts/extract-vmlinux
> /boot/vmlinuz-5.11.0-0.rc6.141.fc34.x86_64 > vmlinux
>
> https://drive.google.com/file/d/1h6cC9oZ16oLbR6NyPqKkVGaoUQ2u1UQz/view?usp=sharing
>
> I recompiled with gcc 10.2.1 and I'm not having these problems, so it
> might be that.
>

sched_reset_on_fork is a bitfield in task_struct. You don't see issue
on gcc 10.2, but see it on gcc 11. GCC 11 started emitting DWARF5 by
default, right? It's something that Arnaldo probably already fixed in
the latest pahole. Could you please try to build pahole from sources
and see if you run into the same problem again?

Verifier is catching a real issue with offsets going backwards. Here's
excerpt from BTF dump of task_struct:

        'pdeath_signal' type_id=17 bits_offset=18048
        'jobctl' type_id=1 bits_offset=18112
        'personality' type_id=6 bits_offset=18176
        'sched_reset_on_fork' type_id=6 bits_offset=0
        'sched_contributes_to_load' type_id=6 bits_offset=0
        'sched_migrated' type_id=6 bits_offset=0
        'sched_psi_wake_requeue' type_id=6 bits_offset=0

...

eventually we get to non-bitfield field

        'atomic_flags' type_id=1 bits_offset=18304

So it's a bitfield offset breakage that should be fixed in pahole 1.20.

>

>
> --
> Chris Murphy

  reply	other threads:[~2021-02-04  2:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 20:26 5:11: in-kernel BTF is malformed Chris Murphy
2021-02-03 22:39 ` Chris Murphy
2021-02-03 23:32   ` Andrii Nakryiko
2021-02-04  0:19     ` Chris Murphy
2021-02-04  0:46     ` Chris Murphy
2021-02-04  1:00       ` Arnaldo Carvalho de Melo
2021-02-04  1:21         ` Chris Murphy
2021-02-04  2:04           ` Andrii Nakryiko [this message]
2021-02-04  2:10             ` Chris Murphy
2021-02-04 13:26               ` Arnaldo Carvalho de Melo
2021-02-04 16:33                 ` [FIXED] " Arnaldo Carvalho de Melo
2021-02-05  3:10                   ` Chris Murphy
2021-02-05 16:06                     ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4Bza4XQxpS7VTNWGk6Rz-iUwZemF6+iAVBA_yvrWnV0k8Qg@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=acme@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).