diff options
author | Hao Luo <haoluo@google.com> | 2020-09-29 16:50:49 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-10-02 15:00:49 -0700 |
commit | 00dc73e44a846fc5310df0e1415a90af76cc135e (patch) | |
tree | e3d0e30829fc1afe77a5a0305216e6ef2b93a381 /kernel/bpf/btf.c | |
parent | 63d9b80dcf2c67bc5ade61cbbaa09d7af21f43f1 (diff) |
bpf/selftests: Test for bpf_per_cpu_ptr() and bpf_this_cpu_ptr()
Test bpf_per_cpu_ptr() and bpf_this_cpu_ptr(). Test two paths in the
kernel. If the base pointer points to a struct, the returned reg is
of type PTR_TO_BTF_ID. Direct pointer dereference can be applied on
the returned variable. If the base pointer isn't a struct, the
returned reg is of type PTR_TO_MEM, which also supports direct pointer
dereference.
Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200929235049.2533242-7-haoluo@google.com
Diffstat (limited to 'kernel/bpf/btf.c')
0 files changed, 0 insertions, 0 deletions