netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>,
	Andrii Nakryiko <andriin@fb.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix test_sysctl_loop{1,2} failure due to clang change
Date: Tue, 8 Sep 2020 22:19:23 -0700	[thread overview]
Message-ID: <32cd16a4-35a8-d2aa-1c0c-dae02bf2b434@fb.com> (raw)
In-Reply-To: <CAADnVQKgZyAMgChwtnHPY2VTgNQN_s+dn2rwFqySiMq_c+C5iw@mail.gmail.com>



On 9/8/20 9:04 PM, Alexei Starovoitov wrote:
> On Tue, Sep 8, 2020 at 8:12 PM Yonghong Song <yhs@fb.com> wrote:
>> diff --git a/tools/testing/selftests/bpf/progs/test_sysctl_loop2.c b/tools/testing/selftests/bpf/progs/test_sysctl_loop2.c
>> index b2e6f9b0894d..3c292c087395 100644
>> --- a/tools/testing/selftests/bpf/progs/test_sysctl_loop2.c
>> +++ b/tools/testing/selftests/bpf/progs/test_sysctl_loop2.c
>> @@ -18,9 +18,9 @@
>>   #define MAX_ULONG_STR_LEN 7
>>   #define MAX_VALUE_STR_LEN (TCP_MEM_LOOPS * MAX_ULONG_STR_LEN)
>>
>> +const char tcp_mem_name[] = "net/ipv4/tcp_mem/very_very_very_very_long_pointless_string_to_stress_byte_loop";
>>   static __attribute__((noinline)) int is_tcp_mem(struct bpf_sysctl *ctx)
>>   {
>> -       volatile char tcp_mem_name[] = "net/ipv4/tcp_mem/very_very_very_very_long_pointless_string_to_stress_byte_loop";
> 
> It fixes the issue with new llvm, but breaks slightly older llvm:

Let me take a look.

>   ./test_progs -n 7/21
> libbpf: load bpf program failed: Permission denied
> libbpf: -- BEGIN DUMP LOG ---
> libbpf:
> invalid stack off=0 size=1
> verification time 6975 usec
> stack depth 160+64
> processed 889 insns (limit 1000000) max_states_per_insn 4 total_states
> 14 peak_states 14 mark_read 10
> 
> libbpf: -- END LOG --
> libbpf: failed to load program 'sysctl_tcp_mem'
> libbpf: failed to load object 'test_sysctl_loop2.o'
> test_bpf_verif_scale:FAIL:114
> #7/21 test_sysctl_loop2.o:FAIL
> 
> clang --version
> clang version 12.0.0 (https://github.com/llvm/llvm-project.git
> 6f3511a01a5227358a334803c264cfce4175ca5d)
> 

      reply	other threads:[~2020-09-09  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  3:12 [PATCH bpf-next] selftests/bpf: fix test_sysctl_loop{1,2} failure due to clang change Yonghong Song
2020-09-09  3:20 ` Andrii Nakryiko
2020-09-09  3:49   ` Yonghong Song
2020-09-09  4:04 ` Alexei Starovoitov
2020-09-09  5:19   ` Yonghong Song [this message]

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=32cd16a4-35a8-d2aa-1c0c-dae02bf2b434@fb.com \
    --to=yhs@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).