Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-08 Thread Masami Hiramatsu
Hello, On Sun, 8 Jan 2017 13:22:42 +0900 Masami Hiramatsu wrote: > > > Would you have any good benchmark to measure it? > > > > Not trivially so; what I did was cobble together a debugfs file that > > measures the average of the PMI time in perf_sample_event_took(), and a > > module that has a 1

Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-07 Thread Masami Hiramatsu
On Wed, 4 Jan 2017 11:01:02 +0100 Peter Zijlstra wrote: > On Wed, Jan 04, 2017 at 02:06:04PM +0900, Masami Hiramatsu wrote: > > On Tue, 3 Jan 2017 11:54:02 +0100 > > Peter Zijlstra wrote: > > > > How many entries should one expect on that list? I spend quite a bit of > > > time reducing the cos

Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-04 Thread Steven Rostedt
On Tue, 3 Jan 2017 11:54:02 +0100 Peter Zijlstra wrote: > How many entries should one expect on that list? I spend quite a bit of > time reducing the cost of is_module_text_address() a while back and see > that both ftrace (which actually needs this to be fast) and now > kprobes have linear list

Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-04 Thread Peter Zijlstra
On Wed, Jan 04, 2017 at 02:06:04PM +0900, Masami Hiramatsu wrote: > On Tue, 3 Jan 2017 11:54:02 +0100 > Peter Zijlstra wrote: > > How many entries should one expect on that list? I spend quite a bit of > > time reducing the cost of is_module_text_address() a while back and see > > that both ftrac

Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-03 Thread Masami Hiramatsu
On Tue, 3 Jan 2017 11:54:02 +0100 Peter Zijlstra wrote: > On Tue, Dec 27, 2016 at 03:14:10PM +0900, Masami Hiramatsu wrote: > > > diff --git a/kernel/extable.c b/kernel/extable.c > > index e820cce..81c9633 100644 > > --- a/kernel/extable.c > > +++ b/kernel/extable.c > > > @@ -123,7 +126,11 @@ i

Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2017-01-03 Thread Peter Zijlstra
On Tue, Dec 27, 2016 at 03:14:10PM +0900, Masami Hiramatsu wrote: > diff --git a/kernel/extable.c b/kernel/extable.c > index e820cce..81c9633 100644 > --- a/kernel/extable.c > +++ b/kernel/extable.c > @@ -123,7 +126,11 @@ int kernel_text_address(unsigned long addr) > return 1; >

[PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area

2016-12-26 Thread Masami Hiramatsu
Make __kernel_text_address()/kernel_text_address() returns true if the given address is on a kprobe's instruction slot, which is generated by kprobes as a trampoline code. This can help stacktraces to determine the address is on a text area or not. To implement this without any sleep in is_kprobe_