]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: validate fake register spill/fill precision backtracking logic
authorAndrii Nakryiko <andrii@kernel.org>
Sat, 9 Dec 2023 01:09:58 +0000 (17:09 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 10 Dec 2023 02:43:20 +0000 (18:43 -0800)
commit7d8ed51bcb32716a40d71043fcd01c4118858c51
tree767e8c161fbe31ff256f95197b9a96c615134c5d
parent482d548d40b0af9af730e4869903d4433e44f014
selftests/bpf: validate fake register spill/fill precision backtracking logic

Add two tests validating that verifier's precision backtracking logic
handles BPF_ST_MEM instructions that produce fake register spill into
register slot. This is happening when non-zero constant is written
directly to a slot, e.g., *(u64 *)(r10 -8) = 123.

Add both full 64-bit register spill, as well as 32-bit "sub-spill".

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231209010958.66758-2-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_spill_fill.c