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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 10 Sep 2020 20:03:33 -0700 From: Alexei Starovoitov <alexei.starovoitov@...il.com> To: Yonghong Song <yhs@...com> Cc: bpf <bpf@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Kernel Team <kernel-team@...com> Subject: Re: [PATCH bpf-next] selftests/bpf: define string const as global for test_sysctl_prog.c On Thu, Sep 10, 2020 at 1:27 PM Yonghong Song <yhs@...com> wrote: > > When tweaking llvm optimizations, I found that selftest build failed > with the following error: > libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1 > libbpf: prog 'sysctl_tcp_mem': bad map relo against '.L__const.is_tcp_mem.tcp_mem_name' > in section '.rodata.str1.1' > Error: failed to open BPF object file: Relocation failed > make: *** [/work/net-next/tools/testing/selftests/bpf/test_sysctl_prog.skel.h] Error 255 > make: *** Deleting file `/work/net-next/tools/testing/selftests/bpf/test_sysctl_prog.skel.h' > > The local string constant "tcp_mem_name" is put into '.rodata.str1.1' section > which libbpf cannot handle. Using untweaked upstream llvm, "tcp_mem_name" > is completely inlined after loop unrolling. > > Commit 7fb5eefd7639 ("selftests/bpf: Fix test_sysctl_loop{1, 2} > failure due to clang change") solved a similar problem by defining > the string const as a global. Let us do the same here > for test_sysctl_prog.c so it can weather future potential llvm changes. > > Signed-off-by: Yonghong Song <yhs@...com> Applied. Thanks
Powered by blists - more mailing lists