Re: [PATCH v4 20/23] [RFC] kprobes: Remove task scan for updating kretprobe_instance

2020-08-28 Thread Masami Hiramatsu
On Fri, 28 Aug 2020 17:18:06 +0200 pet...@infradead.org wrote: > On Sat, Aug 29, 2020 at 12:10:10AM +0900, Masami Hiramatsu wrote: > > On Fri, 28 Aug 2020 14:52:36 +0200 > > pet...@infradead.org wrote: > > > > > synchronize_rcu(); > > > > > > This one might help, this means we can do

Re: [PATCH v4 20/23] [RFC] kprobes: Remove task scan for updating kretprobe_instance

2020-08-28 Thread peterz
On Sat, Aug 29, 2020 at 12:10:10AM +0900, Masami Hiramatsu wrote: > On Fri, 28 Aug 2020 14:52:36 +0200 > pet...@infradead.org wrote: > > > synchronize_rcu(); > > > > This one might help, this means we can do rcu_read_lock() around > > get_kretprobe() and it's usage. Can we call rp->handler()

Re: [PATCH v4 20/23] [RFC] kprobes: Remove task scan for updating kretprobe_instance

2020-08-28 Thread Masami Hiramatsu
On Fri, 28 Aug 2020 14:52:36 +0200 pet...@infradead.org wrote: > > If you do this, can you merge this into the previos patch and then > delete the sched try_to_invoke..() patch? Yes, this is just for making code review easy. :) > > Few comments below. > > On Fri, Aug 28, 2020 at 09:30:17PM

Re: [PATCH v4 20/23] [RFC] kprobes: Remove task scan for updating kretprobe_instance

2020-08-28 Thread peterz
If you do this, can you merge this into the previos patch and then delete the sched try_to_invoke..() patch? Few comments below. On Fri, Aug 28, 2020 at 09:30:17PM +0900, Masami Hiramatsu wrote: > +static nokprobe_inline struct kretprobe *get_kretprobe(struct > kretprobe_instance *ri) > +{

[PATCH v4 20/23] [RFC] kprobes: Remove task scan for updating kretprobe_instance

2020-08-28 Thread Masami Hiramatsu
Remove task scan for updating kretprobe_instance->rp when unregistering kretprobe. Instead, this introduces the kretprobe_holder which is a kretprobe pointer holder with refcount. When we unregister the kretprobe, we update the pointer value in the holder which means this kretprobe is already