bpf: Add verifier tests for the bpf_sk_storage
authorMartin KaFai Lau <kafai@fb.com>
Fri, 26 Apr 2019 23:39:49 +0000 (16:39 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 27 Apr 2019 16:07:05 +0000 (09:07 -0700)
commit7a9bb9762d3302bb407c7bdb0b5f754e5aa595a5
tree03964740cff0910b8d8e82a9cc554d0f547479cd
parent3f4d4c74101d60b88d23289bd4f5f6126c7235fc
bpf: Add verifier tests for the bpf_sk_storage

This patch adds verifier tests for the bpf_sk_storage:
1. ARG_PTR_TO_MAP_VALUE_OR_NULL
2. Map and helper compatibility (e.g. disallow bpf_map_loookup_elem)

It also takes this chance to remove the unused struct btf_raw_data
and uses the BTF encoding macros from "test_btf.h".

Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/bpf/verifier/sock.c