Merge branch 'bpf-fix-accesses-to-uninit-stack-slots'
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Dec 2023 22:19:00 +0000 (14:19 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Dec 2023 22:19:01 +0000 (14:19 -0800)
Andrei Matei says:

====================
bpf: fix accesses to uninit stack slots

Fix two related issues issues around verifying stack accesses:
1. accesses to uninitialized stack memory was allowed inconsistently
2. the maximum stack depth needed for a program was not always
maintained correctly

The two issues are fixed together in one commit because the code for one
affects the other.

V4 to V5:
- target bpf-next (Alexei)

V3 to V4:
- minor fixup to comment in patch 1 (Eduard)
- C89-style in patch 3 (Andrii)

V2 to V3:
- address review comments from Andrii and Eduard
- drop new verifier tests in favor of editing existing tests to check
  for stack depth
- append a patch with a bit of cleanup coming out of the previous review
====================

Link: https://lore.kernel.org/r/20231208032519.260451-1-andreimatei1@gmail.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

Trivial merge