diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-08-15 00:05:56 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-08-17 00:45:07 +0200 |
commit | 652c1b17b85b9c195978c051aa283027529db1fe (patch) | |
tree | d4c4f634ab8cefc26a85c4ea225936a551e509ac /kernel/bpf/syscall.c | |
parent | 7d08c2c9117113fee118487425ed55efa50cbfa9 (diff) | |
download | linux-652c1b17b85b9c195978c051aa283027529db1fe.tar.bz2 |
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 'kernel/bpf/syscall.c')
0 files changed, 0 insertions, 0 deletions