Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-05 Thread Jiri Olsa
On Mon, Apr 05, 2021 at 04:15:54PM +0200, Toke Høiland-Jørgensen wrote: > Jiri Olsa writes: > > > On Sat, Apr 03, 2021 at 11:21:55AM -0700, Alexei Starovoitov wrote: > >> On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote: > >> > >if (!prog->aux->dst_trampoline && !tgt

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-05 Thread Toke Høiland-Jørgensen
Jiri Olsa writes: > On Sat, Apr 03, 2021 at 11:21:55AM -0700, Alexei Starovoitov wrote: >> On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote: >> > > if (!prog->aux->dst_trampoline && !tgt_prog) { >> > > -err = -ENOENT; >> > > -goto out

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-05 Thread Jiri Olsa
On Sat, Apr 03, 2021 at 11:21:55AM -0700, Alexei Starovoitov wrote: > On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote: > > > if (!prog->aux->dst_trampoline && !tgt_prog) { > > > - err = -ENOENT; > > > - goto out_unlock; > > > + /* > > > + *

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-05 Thread Jiri Olsa
On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote: > Jiri Olsa writes: > > > Currently we don't allow re-attaching of trampolines. Once > > it's detached, it can't be re-attach even when the program > > is still loaded. > > > > Adding the possibility to re-attach the loaded t

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-03 Thread Alexei Starovoitov
On Sat, Apr 03, 2021 at 01:24:12PM +0200, Toke Høiland-Jørgensen wrote: > > if (!prog->aux->dst_trampoline && !tgt_prog) { > > - err = -ENOENT; > > - goto out_unlock; > > + /* > > +* Allow re-attach for tracing programs, if it's currently > > +

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-04-03 Thread Toke Høiland-Jørgensen
Jiri Olsa writes: > Currently we don't allow re-attaching of trampolines. Once > it's detached, it can't be re-attach even when the program > is still loaded. > > Adding the possibility to re-attach the loaded tracing > kernel program. Hmm, yeah, didn't really consider this case when I added the

Re: [RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-03-29 Thread Song Liu
> On Mar 28, 2021, at 4:26 AM, Jiri Olsa wrote: > > Currently we don't allow re-attaching of trampolines. Once > it's detached, it can't be re-attach even when the program > is still loaded. > > Adding the possibility to re-attach the loaded tracing > kernel program. > > Signed-off-by: Jiri

[RFC PATCH bpf-next 1/4] bpf: Allow trampoline re-attach

2021-03-28 Thread Jiri Olsa
Currently we don't allow re-attaching of trampolines. Once it's detached, it can't be re-attach even when the program is still loaded. Adding the possibility to re-attach the loaded tracing kernel program. Signed-off-by: Jiri Olsa --- kernel/bpf/syscall.c| 25 +++-- kern