-
- Downloads
bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint
Add .test_run for raw_tracepoint. Also, introduce a new feature that runs the target program on a specific CPU. This is achieved by a new flag in bpf_attr.test, BPF_F_TEST_RUN_ON_CPU. When this flag is set, the program is triggered on cpu with id bpf_attr.test.cpu. This feature is needed for BPF programs that handle perf_event and other percpu resources, as the program can access these resource locally. Signed-off-by:Song Liu <songliubraving@fb.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Acked-by:
John Fastabend <john.fastabend@gmail.com> Acked-by:
Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200925205432.1777-2-songliubraving@fb.com
Showing
- include/linux/bpf.h 3 additions, 0 deletionsinclude/linux/bpf.h
- include/uapi/linux/bpf.h 7 additions, 0 deletionsinclude/uapi/linux/bpf.h
- kernel/bpf/syscall.c 1 addition, 1 deletionkernel/bpf/syscall.c
- kernel/trace/bpf_trace.c 1 addition, 0 deletionskernel/trace/bpf_trace.c
- net/bpf/test_run.c 91 additions, 0 deletionsnet/bpf/test_run.c
- tools/include/uapi/linux/bpf.h 7 additions, 0 deletionstools/include/uapi/linux/bpf.h
Loading
Please register or sign in to comment