summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/unpriv.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2021-03-24 14:52:31 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-04-16 23:52:15 +0200
commitd7a5091351756d0ae8e63134313c455624e36a13 (patch)
tree4f9179a6cfdd07b6c82c179a57fe11cedcf50d74 /tools/testing/selftests/bpf/verifier/unpriv.c
parent7fedb63a8307dda0ec3b8969a3b233a1dd7ea8e0 (diff)
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>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier/unpriv.c')
-rw-r--r--tools/testing/selftests/bpf/verifier/unpriv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/verifier/unpriv.c b/tools/testing/selftests/bpf/verifier/unpriv.c
index 3e32400c4b44..bd436df5cc32 100644
--- a/tools/testing/selftests/bpf/verifier/unpriv.c
+++ b/tools/testing/selftests/bpf/verifier/unpriv.c
@@ -505,7 +505,7 @@
BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_0, -8),
BPF_EXIT_INSN(),
},
- .errstr_unpriv = "R1 tried to add from different maps, paths, or prohibited types",
+ .errstr_unpriv = "R1 stack pointer arithmetic goes out of range",
.result_unpriv = REJECT,
.result = ACCEPT,
},