selftests/bpf: Fix test_vmlinux test to use bpf_probe_read_user()
authorAndrii Nakryiko <andriin@fb.com>
Tue, 18 Aug 2020 21:33:54 +0000 (14:33 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Aug 2020 00:16:15 +0000 (17:16 -0700)
commit02f47faa25db134f6043fb6b12a68b5d4c980bb6
tree82961c0dc05e1d217448e8e82bc899a24e71a340
parent109cea5a594f921632ca599b385aaa0575971045
selftests/bpf: Fix test_vmlinux test to use bpf_probe_read_user()

The test is reading UAPI kernel structure from user-space. So it doesn't need
CO-RE relocations and has to use bpf_probe_read_user().

Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200818213356.2629020-6-andriin@fb.com
tools/testing/selftests/bpf/progs/test_vmlinux.c