BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/5] BPF verifier log improvements
@ 2023-10-11 22:37 Andrii Nakryiko
  2023-10-11 22:37 ` [PATCH bpf-next 1/5] selftests/bpf: improve percpu_alloc test robustness Andrii Nakryiko
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Andrii Nakryiko @ 2023-10-11 22:37 UTC (permalink / raw)
  To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-10-16 12:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 22:37 [PATCH bpf-next 0/5] BPF verifier log improvements Andrii Nakryiko
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox