summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-08-15 10:05:56 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2021-08-17 01:45:07 +0300
commit652c1b17b85b9c195978c051aa283027529db1fe (patch)
treed4c4f634ab8cefc26a85c4ea225936a551e509ac /tools/include
parent7d08c2c9117113fee118487425ed55efa50cbfa9 (diff)
downloadlinux-652c1b17b85b9c195978c051aa283027529db1fe.tar.xz
bpf: Refactor perf_event_set_bpf_prog() to use struct bpf_prog input
Make internal perf_event_set_bpf_prog() use struct bpf_prog pointer as an input argument, which makes it easier to re-use for other internal uses (coming up for BPF link in the next patch). BPF program FD is not as convenient and in some cases it's not available. So switch to struct bpf_prog, move out refcounting outside and let caller do bpf_prog_put() in case of an error. This follows the approach of most of the other BPF internal functions. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210815070609.987780-4-andrii@kernel.org
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions