selftests/bpf: test cases for callchain sensitive live stack tracking
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 19 Sep 2025 02:18:45 +0000 (19:18 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 19 Sep 2025 16:27:24 +0000 (09:27 -0700)
commitfdcecdff905cf712279d3ba72ec8ac7bc02be7ff
treecdbea79ce3890965b52d94378ea10870349eebc7
parent34c513be3dada9fb6314ea8c9ec35d71d09a2e58
selftests/bpf: test cases for callchain sensitive live stack tracking

- simple propagation of read/write marks;
- joining read/write marks from conditional branches;
- avoid must_write marks in when same instruction accesses different
  stack offsets on different execution paths;
- avoid must_write marks in case same instruction accesses stack
  and non-stack pointers on different execution paths;
- read/write marks propagation to outer stack frame;
- independent read marks for different callchains ending with the same
  function;
- bpf_calls_callback() dependent logic in
  liveness.c:bpf_stack_slot_alive().

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250918-callchain-sensitive-liveness-v3-12-c3cd27bacc60@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/verifier.c
tools/testing/selftests/bpf/progs/verifier_live_stack.c [new file with mode: 0644]