On Mon, Jul 26, 2021 at 09:12:00AM -0700, Andrii Nakryiko wrote: > 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. > > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>