aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/verifier/unpriv.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2019-02-09 23:22:26 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-02-10 19:46:17 -0800
commitfb47d1d931f8419645db15ef5fc0dc7a857c8f4e (patch)
tree84f247f2c9ef5015f545d76069493bf87674bd08 /tools/testing/selftests/bpf/verifier/unpriv.c
parentbpf: Sync bpf.h to tools/ (diff)
downloadlinux-dev-fb47d1d931f8419645db15ef5fc0dc7a857c8f4e.tar.xz
linux-dev-fb47d1d931f8419645db15ef5fc0dc7a857c8f4e.zip
bpf: Add skb->sk, bpf_sk_fullsock and bpf_tcp_sock tests to test_verifer
This patch tests accessing the skb->sk and the new helpers, bpf_sk_fullsock and bpf_tcp_sock. The errstr of some existing "reference tracking" tests is changed with s/bpf_sock/sock/ and s/socket/sock/ where "sock" is from the verifier's reg_type_str[]. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
-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 3e046695fad7..dbaf5be947b2 100644
--- a/tools/testing/selftests/bpf/verifier/unpriv.c
+++ b/tools/testing/selftests/bpf/verifier/unpriv.c
@@ -365,7 +365,7 @@
},
.result = REJECT,
//.errstr = "same insn cannot be used with different pointers",
- .errstr = "cannot write into socket",
+ .errstr = "cannot write into sock",
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
},
{