summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2018-03-20 21:19:17 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-03-21 01:08:52 +0300
commitf005afede992e265bb98534b86912bb669ccd0d2 (patch)
treec77bf0158253ff4fbd927bad98dee46c1b6e273b /kernel/bpf
parent52fda36d63bfc8c8e8ae5eda8eb5ac6f52cd67ed (diff)
downloadlinux-f005afede992e265bb98534b86912bb669ccd0d2.tar.xz
trace/bpf: remove helper bpf_perf_prog_read_value from tracepoint type programs
Commit 4bebdc7a85aa ("bpf: add helper bpf_perf_prog_read_value") added helper bpf_perf_prog_read_value so that perf_event type program can read event counter and enabled/running time. This commit, however, introduced a bug which allows this helper for tracepoint type programs. This is incorrect as bpf_perf_prog_read_value needs to access perf_event through its bpf_perf_event_data_kern type context, which is not available for tracepoint type program. This patch fixed the issue by separating bpf_func_proto between tracepoint and perf_event type programs and removed bpf_perf_prog_read_value from tracepoint func prototype. Fixes: 4bebdc7a85aa ("bpf: add helper bpf_perf_prog_read_value") Reported-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions