lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP01T76qFo-fzRh2PjGPtWd-N4tgMyoh_rz2GdZwePy=dRHFgQ@mail.gmail.com>
Date: Tue, 10 Dec 2024 21:42:43 +0100
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: Jiri Olsa <olsajiri@...il.com>
Cc: Laura Nao <laura.nao@...labora.com>, alan.maguire@...cle.com, bpf@...r.kernel.org, 
	chrome-platform@...ts.linux.dev, kernel@...labora.com, 
	linux-kernel@...r.kernel.org, regressions@...ts.linux.dev
Subject: Re: [REGRESSION] module BTF validation failure (Error -22) on next

On Fri, 6 Dec 2024 at 13:37, Jiri Olsa <olsajiri@...il.com> wrote:
>
> On Fri, Nov 15, 2024 at 06:17:12PM +0100, Laura Nao wrote:
> > On 11/13/24 10:37, Laura Nao wrote:
> > >
> > > Currently, KernelCI only retains the bzImage, not the vmlinux binary. The
> > > bzImage can be downloaded from the same link mentioned above by selecting
> > > 'kernel' from the dropdown menu (modules can also be downloaded the same
> > > way). I’ll try to replicate the build on my end and share the vmlinux
> > > with DWARF data stripped for convenience.
> > >
> >
> > I managed to reproduce the issue locally and I've uploaded the vmlinux[1]
> > (stripped of DWARF data) and vmlinux.raw[2] files, as well as one of the
> > modules[3] and its btf data[4] extracted with:
> >
> > bpftool -B vmlinux btf dump file cros_kbd_led_backlight.ko > cros_kbd_led_backlight.ko.raw
> >
> > Looking again at the logs[5], I've noticed the following is reported:
> >
> > [    0.415885] BPF:    type_id=115803 offset=177920 size=1152
> > [    0.416029] BPF:
> > [    0.416083] BPF: Invalid offset
> > [    0.416165] BPF:
> >
> > There are two different definitions of rcu_data in '.data..percpu', one
> > is a struct and the other is an integer:
> >
> > type_id=115801 offset=177920 size=1152 (VAR 'rcu_data')
> > type_id=115803 offset=177920 size=1152 (VAR 'rcu_data')
> >
> > [115801] VAR 'rcu_data' type_id=115572, linkage=static
> > [115803] VAR 'rcu_data' type_id=1, linkage=static
> >
> > [115572] STRUCT 'rcu_data' size=1152 vlen=69
> > [1] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
> >
> > I assume that's not expected, correct?
>
> yes, that seems wrong.. but I can't reproduce with your config
> together with pahole 1.24 .. could you try with latest one?
>

As a data point, I ran into this problem with pahole 1.27 on
bpf/master, I see the same rcu_data duplication.
For now I'm probably going to test patches with the latest pahole.

> jirka
>
> >
> > I'll dig a bit deeper and report back if I can find anything else.
> >
> > [1] https://people.collabora.com/~laura.nao/dbg-btf-mismatch-next-20241113/vmlinux
> > [2] https://people.collabora.com/~laura.nao/dbg-btf-mismatch-next-20241113/vmlinux.raw
> > [3] https://people.collabora.com/~laura.nao/dbg-btf-mismatch-next-20241113/cros_kbd_led_backlight.ko
> > [4] https://people.collabora.com/~laura.nao/dbg-btf-mismatch-next-20241113/cros_kbd_led_backlight.ko.raw
> > [5] https://pastebin.com/raw/FvvrPhAY
> >
> > Best,
> >
> > Laura
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ