All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.10 0/6] Backporting for test_verifier failed
@ 2023-08-01 14:36 Pu Lehui
  2023-08-01 14:36 ` [PATCH 5.10 1/6] bpf: allow precision tracking for programs with subprogs Pu Lehui
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Pu Lehui @ 2023-08-01 14:36 UTC (permalink / raw)
  To: stable, Greg KH, Eduard Zingerman, Luiz Capitulino
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Pu Lehui,
	Pu Lehui

Luiz Capitulino reported the test_verifier test failed:
"precise: ST insn causing spi > allocated_stack".
And it was introduced by the following upstream commit:
ecdf985d7615 ("bpf: track immediate values written to stack by BPF_ST instruction")

Eduard's investigation [4] shows that test failure is not a bug, but a
difference in BPF verifier behavior between upstream, where commits
[1,2,3] by Andrii are present, and 5.10, where these commits are absent.

Backporting strategy is consistent with Eduard in kernel version 6.1 [5],
but with some conflicts in patch #1, #4 and #6 due to the bpf of 5.10
doesn't support more features. Both test_verifier and test_maps have
passed, while test_progs and test_progs-no_alu32 with no new failure
ceses.

Commits of Andrii:
[1] be2ef8161572 ("bpf: allow precision tracking for programs with subprogs")
[2] f63181b6ae79 ("bpf: stop setting precise in current state")
[3] 7a830b53c17b ("bpf: aggressively forget precise markings during state checkpointing")

Links:
[4] https://lore.kernel.org/stable/c9b10a8a551edafdfec855fbd35757c6238ad258.camel@gmail.com/
[5] https://lore.kernel.org/all/20230724124223.1176479-2-eddyz87@gmail.com/

Andrii Nakryiko (4):
  bpf: allow precision tracking for programs with subprogs
  bpf: stop setting precise in current state
  bpf: aggressively forget precise markings during state checkpointing
  selftests/bpf: make test_align selftest more robust

Ilya Leoshkevich (1):
  selftests/bpf: Fix sk_assign on s390x

Yonghong Song (1):
  selftests/bpf: Workaround verification failure for
    fexit_bpf2bpf/func_replace_return_code

 kernel/bpf/verifier.c                         | 175 ++++++++++++++++--
 .../testing/selftests/bpf/prog_tests/align.c  |  36 ++--
 .../selftests/bpf/prog_tests/sk_assign.c      |  25 ++-
 .../selftests/bpf/progs/connect4_prog.c       |   2 +-
 .../selftests/bpf/progs/test_sk_assign.c      |  11 ++
 .../bpf/progs/test_sk_assign_libbpf.c         |   3 +
 6 files changed, 219 insertions(+), 33 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_sk_assign_libbpf.c

-- 
2.25.1


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

end of thread, other threads:[~2023-08-05  5:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 14:36 [PATCH 5.10 0/6] Backporting for test_verifier failed Pu Lehui
2023-08-01 14:36 ` [PATCH 5.10 1/6] bpf: allow precision tracking for programs with subprogs Pu Lehui
2023-08-04 10:33   ` Greg KH
2023-08-04 12:15     ` Pu Lehui
2023-08-04 12:18       ` Eduard Zingerman
2023-08-04 12:34         ` Pu Lehui
2023-08-04 18:56     ` Thorsten Leemhuis
2023-08-05  5:47       ` Greg KH
2023-08-01 14:36 ` [PATCH 5.10 2/6] bpf: stop setting precise in current state Pu Lehui
2023-08-01 14:36 ` [PATCH 5.10 3/6] bpf: aggressively forget precise markings during state checkpointing Pu Lehui
2023-08-01 14:36 ` [PATCH 5.10 4/6] selftests/bpf: make test_align selftest more robust Pu Lehui
2023-08-01 14:36 ` [PATCH 5.10 5/6] selftests/bpf: Workaround verification failure for fexit_bpf2bpf/func_replace_return_code Pu Lehui
2023-08-01 14:37 ` [PATCH 5.10 6/6] selftests/bpf: Fix sk_assign on s390x Pu Lehui
2023-08-02  7:23 ` [PATCH 5.10 0/6] Backporting for test_verifier failed Pu Lehui
2023-08-02  7:28   ` Greg KH
2023-08-02 19:28 ` Luiz Capitulino

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.