aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/jset.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-14bpf, selftests: Adjust few selftest outcomes wrt unreachable codeDaniel Borkmann1-4/+6
In almost all cases from test_verifier that have been changed in here, we've had an unreachable path with a load from a register which has an invalid address on purpose. This was basically to make sure that we never walk this path and to have the verifier complain if it would otherwise. Change it to match on the right error for unprivileged given we now test these paths under speculative execution. There's one case where we match on exact # of insns_processed. Due to the extra path, this will of course mismatch on unprivileged. Thus, restrict the test->insn_processed check to privileged-only. In one other case, we result in a 'pointer comparison prohibited' error. This is similarly due to verifying an 'invalid' branch where we end up with a value pointer on one side of the comparison. Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: John Fastabend <[email protected]> Acked-by: Alexei Starovoitov <[email protected]>
2019-02-05selftests/bpf: add "any alignment" annotation for some testsBjörn Töpel1-0/+2
RISC-V does, in-general, not have "efficient unaligned access". When testing the RISC-V BPF JIT, some selftests failed in the verification due to misaligned access. Annotate these tests with the F_NEEDS_EFFICIENT_UNALIGNED_ACCESS flag. Signed-off-by: Björn Töpel <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
2019-01-27selftests: bpf: break up the rest of test_verifierJakub Kicinski1-0/+165
Break up the rest of test_verifier tests into separate files. Signed-off-by: Jakub Kicinski <[email protected]> Acked-by: Jiong Wang <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>