bpf: Update selftests to reflect new error states
Update various selftest error messages: * The 'Rx tried to sub from different maps, paths, or prohibited types' is reworked into more specific/differentiated error messages for better guidance. * The change into 'value -4294967168 makes map_value pointer be out of bounds' is due to moving the mixed bounds check into the speculation handling and thus occuring slightly later than above mentioned sanity check. * The change into 'math between map_value pointer and register with unbounded min value' is similarly due to register sanity check coming before the mixed bounds check. * The case of 'map access: known scalar += value_ptr from different maps' now loads fine given masks are the same from the different paths (despite max map value size being different). Signed-off-by:Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
John Fastabend <john.fastabend@gmail.com> Acked-by:
Alexei Starovoitov <ast@kernel.org>
Showing
- tools/testing/selftests/bpf/verifier/bounds.c 0 additions, 5 deletionstools/testing/selftests/bpf/verifier/bounds.c
- tools/testing/selftests/bpf/verifier/bounds_deduction.c 11 additions, 10 deletionstools/testing/selftests/bpf/verifier/bounds_deduction.c
- tools/testing/selftests/bpf/verifier/bounds_mix_sign_unsign.c 0 additions, 13 deletions...s/testing/selftests/bpf/verifier/bounds_mix_sign_unsign.c
- tools/testing/selftests/bpf/verifier/map_ptr.c 2 additions, 2 deletionstools/testing/selftests/bpf/verifier/map_ptr.c
- tools/testing/selftests/bpf/verifier/unpriv.c 1 addition, 1 deletiontools/testing/selftests/bpf/verifier/unpriv.c
- tools/testing/selftests/bpf/verifier/value_ptr_arith.c 2 additions, 4 deletionstools/testing/selftests/bpf/verifier/value_ptr_arith.c
Loading
Please register or sign in to comment