Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Steven Rostedt
On Thu, 24 Apr 2014 15:58:53 +0900 Takao Indoh wrote: > Ok, I'll do this. Something like this, right? > > static void ftrace_init_module(struct module *mod, >unsigned long *start, unsigned long *end) > { > if (ftrace_disabled || start == end) >

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Steven Rostedt
On Thu, 24 Apr 2014 17:08:56 +0930 Rusty Russell wrote: > OTOH, if it's just ftrace (do tracepoints have an issue?) I'd rather > hardcode a ftrace_init_module() call in exactly the right place. > Notifiers which are sensitive to their exact call location tend give me > the creeps... I think I

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Rusty Russell
Steven Rostedt writes: > On Tue, 22 Apr 2014 13:21:18 +0930 > Rusty Russell wrote: > > >> Sorry, was on paternity leave. > > Congratulations! Although having two teenage daughters myself, I'm more > inclined to say "my condolences". Thanks... I think! >> I'm always nervous about adding more

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Takao Indoh
(2014/04/23 11:37), Masami Hiramatsu wrote: > (2014/04/23 10:56), Steven Rostedt wrote: >> On Wed, 23 Apr 2014 10:26:00 +0900 >> Masami Hiramatsu wrote: >> >> >>> Agreed. That should be done in a protected (critical) region, >>> and the region must be protected by correct lock. It seems that >>>

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Takao Indoh
(2014/04/23 11:37), Masami Hiramatsu wrote: (2014/04/23 10:56), Steven Rostedt wrote: On Wed, 23 Apr 2014 10:26:00 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Agreed. That should be done in a protected (critical) region, and the region must be protected by correct lock. It

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Rusty Russell
Steven Rostedt rost...@goodmis.org writes: On Tue, 22 Apr 2014 13:21:18 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Sorry, was on paternity leave. Congratulations! Although having two teenage daughters myself, I'm more inclined to say my condolences. Thanks... I think! I'm always

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Steven Rostedt
On Thu, 24 Apr 2014 17:08:56 +0930 Rusty Russell ru...@rustcorp.com.au wrote: OTOH, if it's just ftrace (do tracepoints have an issue?) I'd rather hardcode a ftrace_init_module() call in exactly the right place. Notifiers which are sensitive to their exact call location tend give me the

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-24 Thread Steven Rostedt
On Thu, 24 Apr 2014 15:58:53 +0900 Takao Indoh indou.ta...@jp.fujitsu.com wrote: Ok, I'll do this. Something like this, right? static void ftrace_init_module(struct module *mod, unsigned long *start, unsigned long *end) { if (ftrace_disabled || start ==

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/23 10:56), Steven Rostedt wrote: > On Wed, 23 Apr 2014 10:26:00 +0900 > Masami Hiramatsu wrote: > > >> Agreed. That should be done in a protected (critical) region, >> and the region must be protected by correct lock. It seems that >> the ftrace_lock is not a correct one. > > The

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Steven Rostedt
On Wed, 23 Apr 2014 10:26:00 +0900 Masami Hiramatsu wrote: > Agreed. That should be done in a protected (critical) region, > and the region must be protected by correct lock. It seems that > the ftrace_lock is not a correct one. The setting of RO to RW done by ftrace before doing the normal

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/22 17:35), Takao Indoh wrote: >>> >> But the text is already RO, so it causes panic. We need to call notifier >>> >> before setting it RO. Or should we unset RO temporarily in >>> >> ftrace_process_locs()? >> > >> > Perhaps, IMHO, ftrace needs to change the module RW in

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Steven Rostedt
On Tue, 22 Apr 2014 13:21:18 +0930 Rusty Russell wrote: > Sorry, was on paternity leave. Congratulations! Although having two teenage daughters myself, I'm more inclined to say "my condolences". > > I'm always nervous about adding more states, since every place which > examines the state has

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Takao Indoh
(2014/04/22 16:28), Masami Hiramatsu wrote: > (2014/04/22 14:29), Takao Indoh wrote: >> (2014/04/22 12:51), Rusty Russell wrote: >>> Steven Rostedt writes: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu wrote: > Thank you for reporting with this pretty backtrace :)

Re: Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/22 14:29), Takao Indoh wrote: > (2014/04/22 12:51), Rusty Russell wrote: >> Steven Rostedt writes: >>> On Mon, 24 Mar 2014 20:26:05 +0900 >>> Masami Hiramatsu wrote: >>> >>> Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but

Re: Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/22 14:29), Takao Indoh wrote: (2014/04/22 12:51), Rusty Russell wrote: Steven Rostedt rost...@goodmis.org writes: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Takao Indoh
(2014/04/22 16:28), Masami Hiramatsu wrote: (2014/04/22 14:29), Takao Indoh wrote: (2014/04/22 12:51), Rusty Russell wrote: Steven Rostedt rost...@goodmis.org writes: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Steven Rostedt
On Tue, 22 Apr 2014 13:21:18 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Sorry, was on paternity leave. Congratulations! Although having two teenage daughters myself, I'm more inclined to say my condolences. I'm always nervous about adding more states, since every place which

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/22 17:35), Takao Indoh wrote: But the text is already RO, so it causes panic. We need to call notifier before setting it RO. Or should we unset RO temporarily in ftrace_process_locs()? Perhaps, IMHO, ftrace needs to change the module RW in ftrace_init_module and makes it

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Steven Rostedt
On Wed, 23 Apr 2014 10:26:00 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Agreed. That should be done in a protected (critical) region, and the region must be protected by correct lock. It seems that the ftrace_lock is not a correct one. The setting of RO to RW done by

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-22 Thread Masami Hiramatsu
(2014/04/23 10:56), Steven Rostedt wrote: On Wed, 23 Apr 2014 10:26:00 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Agreed. That should be done in a protected (critical) region, and the region must be protected by correct lock. It seems that the ftrace_lock is not a

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-21 Thread Takao Indoh
(2014/04/22 12:51), Rusty Russell wrote: > Steven Rostedt writes: >> On Mon, 24 Mar 2014 20:26:05 +0900 >> Masami Hiramatsu wrote: >> >> >>> Thank you for reporting with this pretty backtrace :) >>> Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). >> >> Looks to be

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-21 Thread Rusty Russell
Steven Rostedt writes: > On Mon, 24 Mar 2014 20:26:05 +0900 > Masami Hiramatsu wrote: > > >> Thank you for reporting with this pretty backtrace :) >> Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). > > Looks to be more of a module issue than a ftrace issue. > >> >>

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-21 Thread Rusty Russell
Steven Rostedt rost...@goodmis.org writes: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). Looks to be more of a

Re: ftrace/kprobes: Warning when insmod two modules

2014-04-21 Thread Takao Indoh
(2014/04/22 12:51), Rusty Russell wrote: Steven Rostedt rost...@goodmis.org writes: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but ftrace (and

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Takao Indoh
(2014/03/24 23:59), Steven Rostedt wrote: > On Mon, 24 Mar 2014 20:26:05 +0900 > Masami Hiramatsu wrote: > > >> Thank you for reporting with this pretty backtrace :) >> Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). > > Looks to be more of a module issue than a

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Steven Rostedt
On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu wrote: > Thank you for reporting with this pretty backtrace :) > Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). Looks to be more of a module issue than a ftrace issue. > > If the ftrace can set loading module

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Steven Rostedt
On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu wrote: > Thank you for reporting with this pretty backtrace :) > Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). > > If the ftrace can set loading module text read only before the module > subsystem > expected,

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Masami Hiramatsu
(2014/03/24 14:10), Takao Indoh wrote: > Hi all, > > I noticed the following ftrace waring message when I insmod module. > > [ 409.337936] [ cut here ] > [ 409.337945] WARNING: CPU: 12 PID: 10028 at > /mnt/repos/linux/kernel/trace/ftrace.c:1716 ftrace_bug+0x206/0x270()

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Masami Hiramatsu
(2014/03/24 14:10), Takao Indoh wrote: Hi all, I noticed the following ftrace waring message when I insmod module. [ 409.337936] [ cut here ] [ 409.337945] WARNING: CPU: 12 PID: 10028 at /mnt/repos/linux/kernel/trace/ftrace.c:1716 ftrace_bug+0x206/0x270() [

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Steven Rostedt
On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). If the ftrace can set loading module text read only before the

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Steven Rostedt
On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). Looks to be more of a module issue than a ftrace issue. If the

Re: ftrace/kprobes: Warning when insmod two modules

2014-03-24 Thread Takao Indoh
(2014/03/24 23:59), Steven Rostedt wrote: On Mon, 24 Mar 2014 20:26:05 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Thank you for reporting with this pretty backtrace :) Steven, I think this is not the kprobe bug but ftrace (and perhaps, module). Looks to be more of a

ftrace/kprobes: Warning when insmod two modules

2014-03-23 Thread Takao Indoh
Hi all, I noticed the following ftrace waring message when I insmod module. [ 409.337936] [ cut here ] [ 409.337945] WARNING: CPU: 12 PID: 10028 at /mnt/repos/linux/kernel/trace/ftrace.c:1716 ftrace_bug+0x206/0x270() [ 409.337971] Modules linked in: test2(O+)

ftrace/kprobes: Warning when insmod two modules

2014-03-23 Thread Takao Indoh
Hi all, I noticed the following ftrace waring message when I insmod module. [ 409.337936] [ cut here ] [ 409.337945] WARNING: CPU: 12 PID: 10028 at /mnt/repos/linux/kernel/trace/ftrace.c:1716 ftrace_bug+0x206/0x270() [ 409.337971] Modules linked in: test2(O+)