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: <c529897e-d33f-09b9-3142-bcc5db76d10f@kernel.org>
Date:   Wed, 21 Oct 2020 07:52:19 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Érico Rolim <erico.erc@...il.com>,
        dwarves@...r.kernel.org, open list <linux-kernel@...r.kernel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Hao Luo <haoluo@...gle.com>
Subject: Re: Segfault in pahole 1.18 when building kernel 5.9.1 for arm64

On 20. 10. 20, 19:15, Andrii Nakryiko wrote:
> On Tue, Oct 20, 2020 at 3:51 AM Jiri Slaby <jirislaby@...nel.org> wrote:
>>
>> Hi,
>>
>> On 19. 10. 20, 1:18, Érico Rolim wrote:
>>> I'm trying to build kernel 5.9.1 for arm64, and my dotconfig has
>>> `CONFIG_DEBUG_INFO_BTF=y`, which requires pahole for building. However, pahole
>>> version 1.18 segfaults during the build, as can be seen below:
>>>
>>> PAHOLE: Error: Found symbol of zero size when encoding btf (sym:
>>> '__kvm_nvhe_arm64_ssbd_callback_required', cu:
>>> 'arch/arm64/kernel/cpu_errata.c').
>>
>> The symbol is an alias coming from arch/arm64/kernel/vmlinux.lds:
>> __kvm_nvhe_arm64_ssbd_callback_required = arm64_ssbd_callback_required;;
> 
> What's readelf's output for that symbol? If it's legal for SST_OBJECT
> to have size zero, then we should just skip those in pahole. But it
> shouldn't crash in either case, of course. But as Arnaldo mentioned,
> that code changed significantly recently, so please check with latest
> pahole from tmp.libbtf_encoder branch.
...
>> Yeah, I observe the very same. I reported it at:
>> https://bugzilla.suse.com/show_bug.cgi?id=1177921

If you looked here, you would see:
 > $ readelf -Ws vml |grep arm64_ssbd_callback_re
 > 154271: ffff80001133e000     0 OBJECT  GLOBAL DEFAULT   22 
__kvm_nvhe_arm64_ssbd_callback_required
 > 159609: ffff80001133e000     8 OBJECT  WEAK   DEFAULT   22 
arm64_ssbd_callback_required

Yes, its zero-sized. And yes, the error happens even with 
tmp.libbtf_encoder, but pahole doesn't crash and the build finishes fine.

thanks,
-- 
js

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ