aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_verifier.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-12-20 11:35:29 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-12-20 23:47:08 +0100
commit9ee79a65d176e5815877aa148acc956e4cc90c53 (patch)
treed61307e9cdc96d09e6842b4cd44a5bdfbc82596d /tools/testing/selftests/bpf/test_verifier.c
parentbpf/cpumap: make sure frame_size for build_skb is aligned if headroom isn't (diff)
downloadlinux-dev-9ee79a65d176e5815877aa148acc956e4cc90c53.tar.xz
linux-dev-9ee79a65d176e5815877aa148acc956e4cc90c53.zip
bpf: sk_msg, fix sk_msg_md access past end test
Currently, the test to ensure reads past the end of the sk_msg_md data structure fail is incorrectly expecting success. Fix this typo and use correct expected error. Fixes: 945a47d87cee ("bpf: sk_msg, add tests for size field") Reported-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index b246931c46ef..dbd31750b214 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -1879,7 +1879,7 @@ static struct bpf_test tests[] = {
offsetof(struct sk_msg_md, size) + 4),
BPF_EXIT_INSN(),
},
- .errstr = "R0 !read_ok",
+ .errstr = "invalid bpf_context access",
.result = REJECT,
.prog_type = BPF_PROG_TYPE_SK_MSG,
},