summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2020-01-24 14:21:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-02 08:02:30 +0200
commitcb7cd49c9c281cf00fa38a53c2e6ccf708318b87 (patch)
tree6af07cc5b22bb71ba5a475c1fcbd51f2a41440df /tools
parent7b86b8d18e494763ae4b5153a1596da4c2ff6b3c (diff)
bpf: update jmp32 test cases to fix range bound deduction
[ no upstream commit ] Since commit f2d67fec0b43 ("bpf: Undo incorrect __reg_bound_offset32 handling") has been backported to stable, we also need to update related test cases that started to (expectedly) fail on stable. Given the functionality has been reverted we need to move the result to REJECT. Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/verifier/jmp32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/verifier/jmp32.c b/tools/testing/selftests/bpf/verifier/jmp32.c
index bd5cae4a7f73..79eeed6029f5 100644
--- a/tools/testing/selftests/bpf/verifier/jmp32.c
+++ b/tools/testing/selftests/bpf/verifier/jmp32.c
@@ -783,7 +783,8 @@
},
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
.fixup_map_hash_48b = { 4 },
- .result = ACCEPT,
+ .result = REJECT,
+ .errstr = "R8 unbounded memory access",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
@@ -811,7 +812,8 @@
},
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
.fixup_map_hash_48b = { 4 },
- .result = ACCEPT,
+ .result = REJECT,
+ .errstr = "R8 unbounded memory access",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
@@ -839,6 +841,7 @@
},
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
.fixup_map_hash_48b = { 4 },
- .result = ACCEPT,
+ .result = REJECT,
+ .errstr = "R8 unbounded memory access",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},