selftests/bpf: add fp-leaking precise subprog result tests
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 4 Apr 2024 21:45:36 +0000 (14:45 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 5 Apr 2024 01:31:08 +0000 (18:31 -0700)
commit343ca8131c35ba132d200fd9752b60e65357924d
tree46767f1cae8d92aea0b1492ceb2777d42fc872d9
parent1f2a74b41ea8b902687eb97c4e7e3f558801865b
selftests/bpf: add fp-leaking precise subprog result tests

Add selftests validating that BPF verifier handles precision marking
for SCALAR registers derived from r10 (fp) register correctly.

Given `r0 = (s8)r10;` syntax is not supported by older Clang compilers,
use the raw BPF instruction syntax to maximize compatibility.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240404214536.3551295-2-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/include/linux/filter.h
tools/testing/selftests/bpf/progs/verifier_subprog_precision.c