]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Allow bpf_perf_event_read_value in all BPF programs
authorSong Liu <songliubraving@fb.com>
Fri, 14 Feb 2020 23:41:46 +0000 (15:41 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 18 Feb 2020 15:08:27 +0000 (16:08 +0100)
commit032d7f11e5e90045fa297922dcd0a14ccd128aa2
tree58d2c30ae0127f991c0e2caf06edb38b38c97dc7
parent16359735c29e77702b545b3ff65c423423acf2c6
bpf: Allow bpf_perf_event_read_value in all BPF programs

bpf_perf_event_read_value() is NMI safe. Enable it for all BPF programs.
This can be used in fentry/fexit to profile BPF program and individual
kernel function with hardware counters.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200214234146.2910011-1-songliubraving@fb.com
kernel/trace/bpf_trace.c