aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/stack_ptr.c
AgeCommit message (Collapse)AuthorFilesLines
2020-04-20bpf, selftests: Add test for BPF_STX BPF_B storing R10Luke Nelson1-0/+40
This patch adds a test to test_verifier that writes the lower 8 bits of R10 (aka FP) using BPF_B to an array map and reads the result back. The expected behavior is that the result should be the same as first copying R10 to R9, and then storing / loading the lower 8 bits of R9. This test catches a bug that was present in the x86-64 JIT that caused an incorrect encoding for BPF_STX BPF_B when the source operand is R10. Signed-off-by: Xi Wang <[email protected]> Signed-off-by: Luke Nelson <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
2019-01-27selftests: bpf: break up test_verifierJakub Kicinski1-0/+317
Break up the first 10 kLoC of test verifier test cases out into smaller files. Looks like git line counting gets a little flismy above 16 bit integers, so we need two commits to break up test_verifier. Signed-off-by: Jakub Kicinski <[email protected]> Acked-by: Jiong Wang <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>