]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add get_stackid_cannot_attach
authorSong Liu <songliubraving@fb.com>
Thu, 23 Jul 2020 18:06:48 +0000 (11:06 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Jul 2020 03:16:35 +0000 (20:16 -0700)
commit550010b6d3209315b7cc85767e7830e07cc4ed0f
treec87d99dabe2c42a178399bffc9c9e94c2be496a2
parenta3e7b64fe6474fdb38af41c2c1c78c07ca2d9e4c
selftests/bpf: Add get_stackid_cannot_attach

This test confirms that BPF program that calls bpf_get_stackid() cannot
attach to perf_event with precise_ip > 0 but not PERF_SAMPLE_CALLCHAIN;
and cannot attach if the perf_event has exclude_callchain_kernel.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200723180648.1429892-6-songliubraving@fb.com
tools/testing/selftests/bpf/prog_tests/get_stackid_cannot_attach.c [new file with mode: 0644]