]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add selftest for stackmap with build_id in NMI context
authorSong Liu <songliubraving@fb.com>
Mon, 7 May 2018 17:50:49 +0000 (10:50 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 14 May 2018 21:29:45 +0000 (23:29 +0200)
commit044ba7e1b5a3763f5a523d9cf069a67fd5a6a31f
tree96449dabaf9685b7cb23b07ecb0ace00b06dd251
parente3e09411256a90867a4b962987db68304769ec9a
bpf: add selftest for stackmap with build_id in NMI context

This new test captures stackmap with build_id with hardware event
PERF_COUNT_HW_CPU_CYCLES.

Because we only support one ips-to-build_id lookup per cpu in NMI
context, stack_amap will not be able to do the lookup in this test.
Therefore, we didn't do compare_stack_ips(), as it will alwasy fail.

urandom_read.c is extended to run configurable cycles so that it can be
caught by the perf event.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/urandom_read.c