Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-12 Thread Masami Hiramatsu
On Wed, 11 Jul 2018 20:40:45 -0400 Francis Deslauriers wrote: > Le mer. 11 juill. 2018, à 15 h 56, Steven Rostedt > a écrit : > > > > On Wed, 11 Jul 2018 15:34:30 -0400 > > Francis Deslauriers wrote: > > > > > Hi Steven, > > > I tested it and it prevents the kernel crash I am witnessing. > > >

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-12 Thread Masami Hiramatsu
On Wed, 11 Jul 2018 15:34:30 -0400 Francis Deslauriers wrote: > Hi Steven, > I tested it and it prevents the kernel crash I am witnessing. > As for the side-effect that Masami mentioned regarding not being able to probe > function inside the trace_kprobe.c file, I suggest we move the target > fun

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-11 Thread Francis Deslauriers
Le mer. 11 juill. 2018, à 15 h 56, Steven Rostedt a écrit : > > On Wed, 11 Jul 2018 15:34:30 -0400 > Francis Deslauriers wrote: > > > Hi Steven, > > I tested it and it prevents the kernel crash I am witnessing. > > As for the side-effect that Masami mentioned regarding not being able to > > prob

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 15:34:30 -0400 Francis Deslauriers wrote: > Hi Steven, > I tested it and it prevents the kernel crash I am witnessing. > As for the side-effect that Masami mentioned regarding not being able to probe > function inside the trace_kprobe.c file, I suggest we move the target > fun

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-11 Thread Francis Deslauriers
Hi Steven, I tested it and it prevents the kernel crash I am witnessing. As for the side-effect that Masami mentioned regarding not being able to probe function inside the trace_kprobe.c file, I suggest we move the target function in its own separate compile unit so it can be compiled with the ftra

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-07-03 Thread Steven Rostedt
Mathieu and Francis, Looking back, this thread never got further. Would Masami's patch work for you? -- Steve On Sat, 17 Mar 2018 10:22:11 +0900 Masami Hiramatsu wrote: > On Sat, 17 Mar 2018 09:13:34 +0900 > Masami Hiramatsu wrote: > > > On Fri, 16 Mar 2018 13:53:01 -0400 (EDT) > > Mathieu

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-17 Thread Masami Hiramatsu
On Fri, 16 Mar 2018 23:01:54 -0400 Steven Rostedt wrote: > On Sat, 17 Mar 2018 10:22:11 +0900 > Masami Hiramatsu wrote: > > > Or, we can check it by ftrace_location_range() as below patch. > > Cute ;-) > > > > > Note that as a side-effect, we can not trace functions in trace_kprobe.c > > any

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Steven Rostedt
On Sat, 17 Mar 2018 10:22:11 +0900 Masami Hiramatsu wrote: > Or, we can check it by ftrace_location_range() as below patch. Cute ;-) > > Note that as a side-effect, we can not trace functions in trace_kprobe.c > anymore, and this means it is hard to me to make a testcase of kprobe events. > It

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Masami Hiramatsu
On Sat, 17 Mar 2018 09:13:34 +0900 Masami Hiramatsu wrote: > On Fri, 16 Mar 2018 13:53:01 -0400 (EDT) > Mathieu Desnoyers wrote: > > > - On Mar 16, 2018, at 12:48 PM, rostedt rost...@goodmis.org wrote: > > > > > On Fri, 16 Mar 2018 12:41:34 -0400 > > > Steven Rostedt wrote: > > > > > >>

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Masami Hiramatsu
On Fri, 16 Mar 2018 13:53:01 -0400 (EDT) Mathieu Desnoyers wrote: > - On Mar 16, 2018, at 12:48 PM, rostedt rost...@goodmis.org wrote: > > > On Fri, 16 Mar 2018 12:41:34 -0400 > > Steven Rostedt wrote: > > > >> Yes, kprobes are dangerous. I'm not saying it shouldn't be fixed, I'm > >> sayi

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Masami Hiramatsu
On Fri, 16 Mar 2018 12:28:59 -0400 (EDT) Mathieu Desnoyers wrote: > - On Mar 16, 2018, at 11:25 AM, rostedt rost...@goodmis.org wrote: > > > On Fri, 16 Mar 2018 11:18:25 -0400 > > Francis Deslauriers wrote: > > > >> Hi Steven, > >> > >> I completely forgot about this issue until recently

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Steven Rostedt
On Fri, 16 Mar 2018 13:53:01 -0400 (EDT) Mathieu Desnoyers wrote: > Would the general approach you envision be based on emitting all code > generated by compilation of all objects under kernel/tracing and > kernel/events into a specific "nokprobes" text section of the kernel ? > Perhaps we could

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Mathieu Desnoyers
- On Mar 16, 2018, at 12:48 PM, rostedt rost...@goodmis.org wrote: > On Fri, 16 Mar 2018 12:41:34 -0400 > Steven Rostedt wrote: > >> Yes, kprobes are dangerous. I'm not saying it shouldn't be fixed, I'm >> saying that I don't have time to fix it now, but would be happy to >> accept patches i

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Steven Rostedt
On Fri, 16 Mar 2018 12:41:34 -0400 Steven Rostedt wrote: > Yes, kprobes are dangerous. I'm not saying it shouldn't be fixed, I'm > saying that I don't have time to fix it now, but would be happy to > accept patches if someone else does so. And looking at what I replied before for the original pa

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Steven Rostedt
On Fri, 16 Mar 2018 12:28:59 -0400 (EDT) Mathieu Desnoyers wrote: > > We probably didn't discuss it (as there was a lot to discuss, and this > > was probably overshadowed by that). But yes, you should not probe > > ftrace called functions. That is guaranteed to crash and that crash is > > not a b

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Mathieu Desnoyers
- On Mar 16, 2018, at 11:25 AM, rostedt rost...@goodmis.org wrote: > On Fri, 16 Mar 2018 11:18:25 -0400 > Francis Deslauriers wrote: > >> Hi Steven, >> >> I completely forgot about this issue until recently when I encountered it >> again. >> Instrumenting the ftrace_ops_assist_func symbol

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Steven Rostedt
On Fri, 16 Mar 2018 11:18:25 -0400 Francis Deslauriers wrote: > Hi Steven, > > I completely forgot about this issue until recently when I encountered it > again. > Instrumenting the ftrace_ops_assist_func symbol and some other symbol > seems to be causing problems. > > Placing kretprobes like

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2018-03-16 Thread Francis Deslauriers
Hi Steven, I completely forgot about this issue until recently when I encountered it again. Instrumenting the ftrace_ops_assist_func symbol and some other symbol seems to be causing problems. Placing kretprobes like in the following configuration crashes my kernel (4.16.0-rc5) on a Qemu/KVM virtu

Re: [PATCH 2/2] kprobe: fix: Add ftrace_ops_assist_func to kprobe blacklist

2017-07-14 Thread Steven Rostedt
On Fri, 14 Jul 2017 10:58:35 -0400 Francis Deslauriers wrote: > This function is called when a kprobe is hit. Thus it should be > blacklisted to prevent kprobe to be triggered by kprobes. > > Signed-off-by: Francis Deslauriers > --- > kernel/trace/ftrace.c | 2 ++ > 1 file changed, 2 insertion