Re: [PATCH bpf] bpf: Take module reference for ip in module code

2021-03-24 Thread Jiri Olsa
On Wed, Mar 24, 2021 at 12:31:42PM +0100, Jiri Olsa wrote: > On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote: > > On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote: > > > Currently module can be unloaded even if there's a trampoline > > > register in it. It's easily repro

Re: [PATCH bpf] bpf: Take module reference for ip in module code

2021-03-24 Thread Jiri Olsa
On Tue, Mar 23, 2021 at 06:22:37PM -0700, Alexei Starovoitov wrote: > On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote: > > Currently module can be unloaded even if there's a trampoline > > register in it. It's easily reproduced by running in parallel: > > > > # while :; do ./test_progs

Re: [PATCH bpf] bpf: Take module reference for ip in module code

2021-03-23 Thread Alexei Starovoitov
On Tue, Mar 23, 2021 at 10:15:33PM +0100, Jiri Olsa wrote: > Currently module can be unloaded even if there's a trampoline > register in it. It's easily reproduced by running in parallel: > > # while :; do ./test_progs -t module_attach; done > # while :; do ./test_progs -t fentry_test; done >

[PATCH bpf] bpf: Take module reference for ip in module code

2021-03-23 Thread Jiri Olsa
Currently module can be unloaded even if there's a trampoline register in it. It's easily reproduced by running in parallel: # while :; do ./test_progs -t module_attach; done # while :; do ./test_progs -t fentry_test; done Taking the module reference in case the trampoline's ip is within the