selftests/bpf: Ensure core_reloc_kernel is reading test_progs's data only
authorAndrii Nakryiko <andriin@fb.com>
Thu, 21 Nov 2019 17:59:00 +0000 (09:59 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 25 Nov 2019 00:58:46 +0000 (16:58 -0800)
commit6147a140c99f1ded2b519dfbed17e781e5861bf3
tree3d3484f31c432843f412fb9ee4bf72ee8777baed
parent1aace10f41adf1080d1cc54de9b3db98b8b8b0fb
selftests/bpf: Ensure core_reloc_kernel is reading test_progs's data only

test_core_reloc_kernel.c selftest is the only CO-RE test that reads and
returns for validation calling thread's information (pid, tgid, comm). Thus it
has to make sure that only test_prog's invocations are honored.

Fixes: df36e621418b ("selftests/bpf: add CO-RE relocs testing setup")
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20191121175900.3486133-1-andriin@fb.com
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c