diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2021-05-31 12:34:24 +0000 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-06-14 23:06:38 +0200 |
commit | 973377ffe8148180b2651825b92ae91988141b05 (patch) | |
tree | 363aad5d7260456848f4ea67f781db338a2afc6d /net/batman-adv | |
parent | 9183671af6dbf60a1219371d4ed73e23f43b49db (diff) | |
download | linux-973377ffe8148180b2651825b92ae91988141b05.tar.bz2 |
bpf, selftests: Adjust few selftest outcomes wrt unreachable code
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 <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/batman-adv')
0 files changed, 0 insertions, 0 deletions