[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [linux-image-5.10.0-1-amd64] Requirement of pahole binary with CONFIG_DEBUG_INFO_BTF=y



On Mon, Jan 11, 2021 at 1:05 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> On Mon, Jan 11, 2021 at 12:33 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > On Mon, Jan 11, 2021 at 11:29 AM Salvatore Bonaccorso <carnil@debian.org> wrote:
> > >
> > >
> > > On Mon, Jan 11, 2021 at 09:57:43AM +0100, Sedat Dilek wrote:
> > > > Hi,
> > > >
> > > > yesterday, I installed linux-image-5.10.0-1-amd64 version 5.10.5-1
> > > > from Debian/unstable.
> > > >
> > > > I am building custom Linux-kernels mostly to test with LLVM/Clang and
> > > > use Debian's kernel-config file as a base for my work.
> > > >
> > > > With CONFIG_DEBUG_INFO_BTF=y there is a requirement for pahole binary
> > > > from dwarves package.
> > > >
> > > > The requirement is coded in [1]:
> > > >
> > > > if ! [ -x "$(command -v ${PAHOLE})" ]; then
> > > > echo >&2 "BTF: ${1}: pahole (${PAHOLE}) is not available"
> > > > return 1
> > > > fi
> > > >
> > > > Is there an install-recommendation for dwarves package?
> > > > If not - I would like to open a bug-report.
> > > >
> > > > If you need further information, please let me know.
> > >
> > > this change happened in
> > > https://salsa.debian.org/kernel-team/linux/-/commit/929891281c61ce4403ddd869664c949692644a2f
> > > (actually earlier, then reverted and enabled for a subset of
> > > architectures wiith the above commit).
> > >
> > > For the Debian build it adds as well the Build-Depends on dwarves (>=
> > > 1.16~).
> > >
> > > Did I understood your question correctly?
> > >
> >
> > Hi Salvatore,
> >
> > That commit looks good to me.
> >
> > Anyway, it breaks here CONFIG_DEBUG_INFO_BTF=y:
> >
> > + [ -n y -a -n y ]
> > + info BTFIDS vmlinux
> > + [  != silent_ ]
> > + printf   %-7s %s\n BTFIDS vmlinux
> >  BTFIDS  vmlinux
> > + ./tools/bpf/resolve_btfids/resolve_btfids vmlinux
> > FAILED: load BTF from vmlinux: Invalid argument
> > + on_exit
> > + [ 255 -ne 0 ]
> > + cleanup
> > + rm -f .btf.vmlinux.bin.o
> >
> > Any comments?
> >
>
> According to [1]:
> Q: Where do I find LLVM with BPF support?
>
> OK, I see my selfmade LLVM toolchain has no BPF support.
>
> $ which llc
> /home/dileks/src/llvm-toolchain/install/bin/llc
>
> $ llc --version
> LLVM (http://llvm.org/):
>  LLVM version 11.0.1
>  Optimized build.
>  Default target: x86_64-unknown-linux-gnu
>  Host CPU: sandybridge
>
>  Registered Targets:
>    x86    - 32-bit X86: Pentium-Pro and above
>    x86-64 - 64-bit X86: EM64T and AMD64
>
> Debian's LLC has BPF support:
>
> $ /usr/bin/llc-11 --version | grep -i bpf
>    bpf        - BPF (host endian)
>    bpfeb      - BPF (big endian)
>    bpfel      - BPF (little endian)
>
> I am sorry for the noise.
>

I opened an issue for tc-build (toolchain build-system for
ClangBuiltLinux folks):

"Option for BPF support when CONFIG_DEBUG_INFO_BTF=y"

- Sedat -

[1] https://github.com/ClangBuiltLinux/tc-build/issues/129


Reply to: