Re: [PATCH dwarves] dwarf_loader: handle DWARF5 DW_OP_addrx properly

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

 





On 4/4/21 5:20 PM, Sedat Dilek wrote:
On Sun, Apr 4, 2021 at 7:25 PM Sedat Dilek <sedat.dilek@xxxxxxxxx> wrote:
[ ... ]
Yonghong Song as you described your build-environment and checking
requirements for clang-13 in bpf-next (see [1]), I am unsure if I want
to upgrade LLVM toolchain to v13-git and use bpf-next as the new
kernel base.
Lemme see if I get LLVM/Clang v13-git from Debian/experimental and/or
<apt.llvm.org>.

If you want to run bpf-next, clang v13 definitely recommended.
But I think if you use clang v13 to run linus linux, you may
hit DWARF5 DW_OP_addrx as well. But unfortunately you will
may hit a few selftest issues (e.g., BPF_TCP_CLOSE issue).


OK, I started a fresh build with LLVM/Clang v13-git from <apt.llvm.org>...

$ /usr/lib/llvm-13/bin/clang --version
Debian clang version
13.0.0-++20210404092853+c4c511337247-1~exp1~20210404073605.3891
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-13/bin

...with latest bpf-next as new base.

I applied your/this pahole patch "[PATCH dwarves] dwarf_loader: handle
DWARF5 DW_OP_addrx properly".

Will report later...


Yupp, works.

$ cat /proc/version
Linux version 5.12.0-rc5-13-amd64-clang13-lto
(sedat.dilek@xxxxxxxxx@iniza) (Debian clang version
13.0.0-++20210404092853+c4c511337247-1~exp1~20210404073605.3891, LLD
13.0.0) #13~bullseye+dileks1 SMP 2021-04-04

MAKE="make V=1"
MAKE_OPTS="LLVM=1 LLVM_IAS=1"
MAKE_OPTS="$MAKE_OPTS PAHOLE=/opt/pahole/bin/pahole"

$ LC_ALL=C $MAKE $MAKE_OPTS -C tools/testing/selftests/bpf/ 2>&1 | tee
../make-log_tools-testing-selftests-bpf_llvm-1-llvm_ias-1.txt

dileks@iniza:~/src/linux-kernel/git/tools/testing/selftests/bpf$ sudo
./test_progs -n 55/2
#55/2 subprog:OK
#55 kfunc_call:OK
Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED

My linux-config and
make-log_tools-testing-selftests-bpf_llvm-1_llvm_ias-1.txt.gz files
are attached.

Feel free to add my:

Tested-by: Sedat Dilek <sedat.dilek@xxxxxxxxx> # LLVM/Clang v13-git (x86-64)

Great! Thanks for the help to test the pahole/kernel patches.


- Sedat -

P.S.: List of some relevant Linux Kconfigs

$ grep 'LTO_|_BTF|DWARF' /boot/config-5.12.0-rc5-13-amd64-clang13-lto
| grep ^CONFIG | sort
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_DEBUG_INFO_DWARF5=y
CONFIG_HAS_LTO_CLANG=y
CONFIG_LTO_CLANG_THIN=y
CONFIG_LTO_CLANG=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y

- EOT -




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux