From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>,
<martin.lau@kernel.org>
Cc: <andrii@kernel.org>, <kernel-team@meta.com>
Subject: [PATCH bpf-next 0/5] BPF verifier log improvements
Date: Wed, 11 Oct 2023 15:37:23 -0700 [thread overview]
Message-ID: <20231011223728.3188086-1-andrii@kernel.org> (raw)
This patch set fixes ambiguity in BPF verifier log output of SCALAR register
in the parts that emit umin/umax, smin/smax, etc ranges. See patch #4 for
details.
Also, patch #5 fixes an issue with verifier log missing instruction context
(state) output for conditionals that trigger precision marking. See details in
the patch.
First two patches are just improvements to two selftests that are very flaky
locally when run in parallel mode.
Patch #3 changes 'align' selftest to be less strict about exact verifier log
output (which patch #4 changes, breaking lots of align tests as written). Now
test does more of a register substate checks, mostly around expected var_off()
values. This 'align' selftests is one of the more brittle ones and requires
constant adjustment when verifier log output changes, without really catching
any new issues. So hopefully these changes can minimize future support efforts
for this specific set of tests.
Andrii Nakryiko (5):
selftests/bpf: improve percpu_alloc test robustness
selftests/bpf: improve missed_kprobe_recursion test robustness
selftests/bpf: make align selftests more robust
bpf: disambiguate SCALAR register state output in verifier logs
bpf: ensure proper register state printing for cond jumps
kernel/bpf/verifier.c | 74 ++++--
.../testing/selftests/bpf/prog_tests/align.c | 241 +++++++++---------
.../testing/selftests/bpf/prog_tests/missed.c | 8 +-
.../selftests/bpf/prog_tests/percpu_alloc.c | 3 +
.../selftests/bpf/progs/exceptions_assert.c | 18 +-
.../selftests/bpf/progs/percpu_alloc_array.c | 7 +
.../progs/percpu_alloc_cgrp_local_storage.c | 4 +
.../selftests/bpf/progs/verifier_ldsx.c | 2 +-
8 files changed, 200 insertions(+), 157 deletions(-)
--
2.34.1
next reply other threads:[~2023-10-11 22:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 22:37 Andrii Nakryiko [this message]
2023-10-11 22:37 ` [PATCH bpf-next 1/5] selftests/bpf: improve percpu_alloc test robustness Andrii Nakryiko
2023-10-12 6:04 ` Yafang Shao
2023-10-12 16:37 ` Andrii Nakryiko
2023-10-11 22:37 ` [PATCH bpf-next 2/5] selftests/bpf: improve missed_kprobe_recursion " Andrii Nakryiko
2023-10-12 13:22 ` Jiri Olsa
2023-10-11 22:37 ` [PATCH bpf-next 3/5] selftests/bpf: make align selftests more robust Andrii Nakryiko
2023-10-11 22:37 ` [PATCH bpf-next 4/5] bpf: disambiguate SCALAR register state output in verifier logs Andrii Nakryiko
2023-10-12 5:33 ` John Fastabend
2023-10-12 16:22 ` Andrii Nakryiko
2023-10-12 16:59 ` John Fastabend
2023-10-12 17:45 ` Andrii Nakryiko
2023-10-11 22:37 ` [PATCH bpf-next 5/5] bpf: ensure proper register state printing for cond jumps Andrii Nakryiko
2023-10-12 5:40 ` [PATCH bpf-next 0/5] BPF verifier log improvements John Fastabend
2023-10-12 15:00 ` Eduard Zingerman
2023-10-16 12:00 ` patchwork-bot+netdevbpf
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=20231011223728.3188086-1-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@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