Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Steven Rostedt wrote: > > Are you OK with this patch? I set it for stable and plan on pushing it > with the patches for the upcoming merge window. If you are OK, mind > giving me an Acked or Reviewed-by? Yes, thanks, feel free to add Acked-by: Oleg Nesterov > Even if it is

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Steven Rostedt wrote: > > Are you OK with this patch? I set it for stable and plan on pushing it > with the patches for the upcoming merge window. If you are OK, mind > giving me an Acked or Reviewed-by? Yes, thanks, feel free to add Acked-by: Oleg Nesterov > Even if it is

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Steven Rostedt
[ Removing Jovi as his email is bouncing ] On Fri, 10 Aug 2018 15:36:08 +0200 Oleg Nesterov wrote: > > > Can't we change uprobe_trace_func() and uretprobe_trace_func() to use > > > rcu_read_lock_sched() instead? It is more cheap. > > > > Is it? rcu_read_lock_sched() is a preempt_disable(),

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Steven Rostedt
[ Removing Jovi as his email is bouncing ] On Fri, 10 Aug 2018 15:36:08 +0200 Oleg Nesterov wrote: > > > Can't we change uprobe_trace_func() and uretprobe_trace_func() to use > > > rcu_read_lock_sched() instead? It is more cheap. > > > > Is it? rcu_read_lock_sched() is a preempt_disable(),

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Steven Rostedt wrote: > > On Fri, 10 Aug 2018 13:35:49 +0200 > Oleg Nesterov wrote: > > > On 08/09, Steven Rostedt wrote: > > > > > > --- a/kernel/trace/trace_uprobe.c > > > +++ b/kernel/trace/trace_uprobe.c > > > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Steven Rostedt wrote: > > On Fri, 10 Aug 2018 13:35:49 +0200 > Oleg Nesterov wrote: > > > On 08/09, Steven Rostedt wrote: > > > > > > --- a/kernel/trace/trace_uprobe.c > > > +++ b/kernel/trace/trace_uprobe.c > > > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Steven Rostedt
On Fri, 10 Aug 2018 13:35:49 +0200 Oleg Nesterov wrote: > On 08/09, Steven Rostedt wrote: > > > > --- a/kernel/trace/trace_uprobe.c > > +++ b/kernel/trace/trace_uprobe.c > > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct > > trace_event_file *file) > > > >

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Steven Rostedt
On Fri, 10 Aug 2018 13:35:49 +0200 Oleg Nesterov wrote: > On 08/09, Steven Rostedt wrote: > > > > --- a/kernel/trace/trace_uprobe.c > > +++ b/kernel/trace/trace_uprobe.c > > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct > > trace_event_file *file) > > > >

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Oleg Nesterov wrote: > > @@ -920,7 +918,8 @@ probe_event_enable(struct trace_uprobe * > ret = uprobe_register(tu->inode, tu->offset, >consumer); > if (ret) > goto err_buffer; > - > + add: > + list_add_tail_rcu(>list, >tp.files); if (link)

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/10, Oleg Nesterov wrote: > > @@ -920,7 +918,8 @@ probe_event_enable(struct trace_uprobe * > ret = uprobe_register(tu->inode, tu->offset, >consumer); > if (ret) > goto err_buffer; > - > + add: > + list_add_tail_rcu(>list, >tp.files); if (link)

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/09, Steven Rostedt wrote: > > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct > trace_event_file *file) > > list_del_rcu(>list); > /* synchronize with

Re: [PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-10 Thread Oleg Nesterov
On 08/09, Steven Rostedt wrote: > > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -952,7 +952,7 @@ probe_event_disable(struct trace_uprobe *tu, struct > trace_event_file *file) > > list_del_rcu(>list); > /* synchronize with

[PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-09 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" While debugging another bug, I was looking at all the synchronize*() functions being used in kernel/trace, and noticed that trace_uprobes was using synchronize_sched(), with a comment to synchronize with {u,ret}_probe_trace_func(). When looking at those

[PATCH] uprobes: Use synchronize_rcu() not synchronize_sched()

2018-08-09 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" While debugging another bug, I was looking at all the synchronize*() functions being used in kernel/trace, and noticed that trace_uprobes was using synchronize_sched(), with a comment to synchronize with {u,ret}_probe_trace_func(). When looking at those