]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: arg tracking for imprecise/multi-offset BPF_ST/STX
authorEduard Zingerman <eddyz87@gmail.com>
Mon, 13 Apr 2026 23:30:53 +0000 (16:30 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Apr 2026 15:40:48 +0000 (08:40 -0700)
commitd97cc8fc997c77234580c77b21466164ff71307a
tree88f4a71a13cdb70f66f0b6792d35bce164ee8882
parentecdd4fd8a54ca4679ab8676674a2388ea37eee1a
selftests/bpf: arg tracking for imprecise/multi-offset BPF_ST/STX

Add test cases for clear_stack_for_all_offs and dst_is_local_fp
handling of multi-offset and ARG_IMPRECISE stack pointers:

- st_imm_join_with_multi_off: BPF_ST through multi-offset dst should
  join at_stack with none instead of overwriting both candidate slots.
- st_imm_join_with_imprecise_off: BPF_ST through offset-imprecise dst
  should join at_stack with none instead of clearing all slots.
- st_imm_join_with_single_off: a canary checking that BPF_ST with a
  known offset overwrites slot instead of joining.
- imprecise_dst_spill_join: BPF_STX through ARG_IMPRECISE dst should
  be recognized as a local spill and join at_stack with the written
  value.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260413-stacklive-fixes-v2-2-398e126e5cf3@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_live_stack.c