From: Alexei Starovoitov <ast@meta.com>
To: Eduard Zingerman <eddyz87@gmail.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kernel Team <kernel-team@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: check nullness propagation for reg to reg comparisons
Date: Tue, 15 Nov 2022 12:51:13 -0800 [thread overview]
Message-ID: <389de1f4-b9fe-7b4c-b383-31908a063d59@meta.com> (raw)
In-Reply-To: <9c6f292415c36ea8409eaee466b197bb0ba7f02d.camel@gmail.com>
On 11/15/22 12:31 PM, Eduard Zingerman wrote:
> On Mon, 2022-11-14 at 10:01 -0800, Alexei Starovoitov wrote:
>> On Fri, Aug 26, 2022 at 10:30 AM Eduard Zingerman <eddyz87@gmail.com> wrote:
>>>
>>> Verify that nullness information is porpagated in the branches of
>>> register to register JEQ and JNE operations.
>>>
>>> Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
>>> Acked-by: Yonghong Song <yhs@fb.com>
>>> ---
>>> .../bpf/verifier/jeq_infer_not_null.c | 166 ++++++++++++++++++
>>> 1 file changed, 166 insertions(+)
>>> create mode 100644 tools/testing/selftests/bpf/verifier/jeq_infer_not_null.c
>>
>> These 4 new tests are failing in unpriv.
>
> This is interesting. 'test_verifier' passed for me because of
> kernel.unprivileged_bpf_disabled = 1 on my test VM.
> But It also passed on CI ([1]) with the following log:
>
> 2022-11-06T21:15:53.2873411Z #686/u jne/jeq infer not null, PTR_TO_SOCKET_OR_NULL -> PTR_TO_SOCKET for JNE false branch SKIP
> 2022-11-06T21:15:53.2908232Z #686/p jne/jeq infer not null, PTR_TO_SOCKET_OR_NULL -> PTR_TO_SOCKET for JNE false branch OK
>
> To skip or not to skip is decided by test_verifier.c:do_test:
>
> if (test_as_unpriv(test) && unpriv_disabled) {
> printf("#%d/u %s SKIP\n", i, test->descr);
> skips++;
> }
>
> The 'test_as_unpriv(test)' is true for my tests because of the
> .prog_type == BPF_PROG_TYPE_CGROUP_SKB.
> 'unpriv_disabled' is a global set by test_verifier.c:get_unpriv_disabled:
>
> static void get_unpriv_disabled()
> {
> char buf[2];
> FILE *fd;
>
> fd = fopen("/proc/sys/"UNPRIV_SYSCTL, "r");
> // ...
> if (fgets(buf, 2, fd) == buf && atoi(buf))
> unpriv_disabled = true;
> fclose(fd);
> }
>
> Might it be the case that CI configuration needs an update as below:
> sysctl kernel.unprivileged_bpf_disabled=0
> ?
Yeah. Makes sense to enable unpriv in CI, since it's missing tests
in the current form.
prev parent reply other threads:[~2022-11-15 20:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 17:29 [PATCH bpf-next 0/2] propagate nullness information for reg to reg comparisons Eduard Zingerman
2022-08-26 17:29 ` [PATCH bpf-next 1/2] bpf: " Eduard Zingerman
2022-08-29 14:23 ` Daniel Borkmann
2022-08-30 10:41 ` Eduard Zingerman
2022-09-01 8:13 ` Shung-Hsi Yu
2022-09-01 9:01 ` Shung-Hsi Yu
2022-10-27 22:18 ` Eduard Zingerman
2022-08-26 17:29 ` [PATCH bpf-next 2/2] selftests/bpf: check nullness propagation " Eduard Zingerman
2022-11-14 18:01 ` Alexei Starovoitov
2022-11-15 20:31 ` Eduard Zingerman
2022-11-15 20:51 ` Alexei Starovoitov [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=389de1f4-b9fe-7b4c-b383-31908a063d59@meta.com \
--to=ast@meta.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@fb.com \
--cc=yhs@fb.com \
/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.