From: John Fastabend Date: Thu, 20 Dec 2018 19:35:29 +0000 (-0800) Subject: bpf: sk_msg, fix sk_msg_md access past end test X-Git-Tag: v5.0-rc1~129^2~15^2^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ee79a65d176e5815877aa148acc956e4cc90c53;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann --- diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index b246931c46ef7..dbd31750b2141 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, },