From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: dwarves@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bpf@vger.kernel.org, Alan Maguire <alan.maguire@oracle.com>,
Jiri Olsa <jolsa@kernel.org>, Jan Engelhardt <jengelh@inai.de>,
Matthias Schwarzott <zzam@gentoo.org>,
Viktor Malik <vmalik@redhat.com>,
Eduard Zingerman <eddyz87@gmail.com>,
Jan Alexander Steffens <heftig@archlinux.org>,
Domenico Andreoli <cavok@debian.org>,
Dominique Leuenberger <dimstar@opensuse.org>,
Daniel Xu <dxu@dxuuu.xyz>,
Yonghong Song <yonghong.song@linux.dev>,
llvm@lists.linux.dev
Subject: Re: ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs)
Date: Mon, 17 Jun 2024 16:39:36 -0300 [thread overview]
Message-ID: <ZnCQ-Psf_WswMk1W@x1> (raw)
In-Reply-To: <20240613214019.GA1423015@thelio-3990X>
On Thu, Jun 13, 2024 at 02:40:19PM -0700, Nathan Chancellor wrote:
> Hi Arnaldo,
>
> On Tue, Jun 11, 2024 at 06:26:53PM -0300, Arnaldo Carvalho de Melo wrote:
> > The v1.27 release of pahole and its friends is out, supporting
> > parallel reproducible builds and encoding kernel kfuncs in BTF, allowing
> > tools such as bpftrace to enumerate the available kfuncs and obtain its
> > function signatures and return types.
>
> After commit f632e75 ("dwarf_loader: Add the cu to the cus list early,
> remove on LSK_DELETE"), I (and others[1]) notice a crash when running
> pahole on modules built with Clang when CONFIG_LTO_CLANG is enabled:
>
> $ curl -LSso .config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config
>
> $ scripts/config -d LTO_NONE -e LTO_CLANG_THIN
>
> $ make -skj"$(nproc)" ARCH=x86_64 LLVM=1 olddefconfig vmlinux crypto/cast_common.ko
> make[3]: *** [scripts/Makefile.modfinal:59: crypto/cast_common.ko] Error 139
>
> I've isolated this to the following commands using the files available
> at [2] (these were built with LLVM 18 but I could reproduce it with LLVM
> 17 and LLVM 19, so it appears to impact a number of versions):
>
> $ tar -tf clang-lto-pahole-1.27-crash.tar.zst
> clang-lto-pahole-1.27-crash/
> clang-lto-pahole-1.27-crash/cast_common.mod.o
> clang-lto-pahole-1.27-crash/module.lds
> clang-lto-pahole-1.27-crash/cast_common.o
> clang-lto-pahole-1.27-crash/cast_common.ko.bak
> clang-lto-pahole-1.27-crash/vmlinux
> clang-lto-pahole-1.27-crash/cast_common.ko
>
> $ tar -axf clang-lto-pahole-1.27-crash.tar.zst
>
> $ cd clang-lto-pahole-1.27-crash
>
> $ LLVM_OBJCOPY="llvm-objcopy" pahole-1.26 -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func --lang_exclude=rust --btf_base vmlinux cast_common.ko
>
> $ cp cast_common.ko{.bak,}
>
> $ LLVM_OBJCOPY="llvm-objcopy" pahole-1.27 -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func --lang_exclude=rust --btf_base vmlinux cast_common.ko
> fish: Job 1, '...' terminated by signal SIGSEGV (Address boundary error)
>
> If there is any more information I can provide or patches I can test, I
> am more than happy to do so.
I reproduced the problem by just running 'pahole cast_common.ko", so
this isn't even related to the BTF parts, its about the DWARF loader,
I'm on it, thanks for the detailed report and for providing the files.
- Arnaldo
> [1]: https://gitlab.archlinux.org/archlinux/packaging/packages/pahole/-/issues/1
> [2]: https://1drv.ms/u/s!AsQNYeB-IEbqqC2F28JuLy__Q7Vd?e=KsraMU
>
> Cheers,
> Nathan
>
next prev parent reply other threads:[~2024-06-17 19:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 21:26 ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs) Arnaldo Carvalho de Melo
2024-06-11 21:38 ` Dominique Martinet
2024-06-11 22:52 ` Arnaldo Carvalho de Melo
2024-06-11 23:46 ` Dominique Martinet
2024-06-12 10:07 ` Matthias Schwarzott
2024-06-14 19:09 ` Arnaldo Carvalho de Melo
2024-06-13 21:40 ` Nathan Chancellor
2024-06-17 19:39 ` Arnaldo Carvalho de Melo [this message]
2024-06-17 20:02 ` [PATCH/RFT] " Arnaldo Carvalho de Melo
2024-06-17 21:08 ` Nathan Chancellor
2024-06-18 13:51 ` Arnaldo Carvalho de Melo
2024-06-18 14:30 ` [PATCH fyi 1/1] dwarf_loader: Add missing cus__add(cus, cu) to cus__merge_and_process_cu() Arnaldo Carvalho de Melo
2024-07-10 19:31 ` [PATCH/RFT] Re: ANNOUNCE: pahole v1.27 (reproducible builds, BTF kfuncs) Nathan Chancellor
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=ZnCQ-Psf_WswMk1W@x1 \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=cavok@debian.org \
--cc=dimstar@opensuse.org \
--cc=dwarves@vger.kernel.org \
--cc=dxu@dxuuu.xyz \
--cc=eddyz87@gmail.com \
--cc=heftig@archlinux.org \
--cc=jengelh@inai.de \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=vmalik@redhat.com \
--cc=yonghong.song@linux.dev \
--cc=zzam@gentoo.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.