Re: Re: Re: Re: Re: [PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-30 Thread Masami Hiramatsu
for the pointer! :) It needs not a CPP macro but an assembly macro. OK, I'll try that. Thanks again, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com

Re: Re: Re: Re: [PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-28 Thread Masami Hiramatsu
(2013/11/27 22:30), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/22 11:35), Masami Hiramatsu wrote: (2013/11/21 16:29), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/21 2:36), Frank Ch. Eigler wrote

Re: [PATCH -tip v3 02/23] kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist

2013-11-27 Thread Masami Hiramatsu
(2013/11/27 22:32), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: +#ifdef CONFIG_KPROBES +/* + * Blacklist ganerating macro. Specify functions which is not probed + * by using this macro. + */ +#define __NOKPROBE_SYMBOL(fname

Re: Re: [PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c

2013-11-26 Thread Masami Hiramatsu
(2013/11/23 6:21), Andi Kleen wrote: On Wed, Nov 20, 2013 at 04:22:21AM +, Masami Hiramatsu wrote: Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in trap.c. This also applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL

Re: Re: [PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c

2013-11-23 Thread Masami Hiramatsu
(2013/11/23 6:21), Andi Kleen wrote: On Wed, Nov 20, 2013 at 04:22:21AM +, Masami Hiramatsu wrote: Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in trap.c. This also applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL

Re: Re: Re: [PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-22 Thread Masami Hiramatsu
(2013/11/22 11:35), Masami Hiramatsu wrote: (2013/11/21 16:29), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/21 2:36), Frank Ch. Eigler wrote: [ ... ] one needs to resort to something like: # cat /proc/kallsyms | grep ' [tT] ' | while read addr

Re: [PATCH -tip v3 18/23] x86/dumpstack: Use NOKPROBE_SYMBOL macro in dumpstack.c

2013-11-21 Thread Masami Hiramatsu
(2013/11/21 20:30), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in dumpstack.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas

Re: Re: [PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-21 Thread Masami Hiramatsu
(2013/11/21 16:29), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/21 2:36), Frank Ch. Eigler wrote: [ ... ] one needs to resort to something like: # cat /proc/kallsyms | grep ' [tT] ' | while read addr type symbol; do perf probe $symbol done

Re: [PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-20 Thread Masami Hiramatsu
it is good to fix all such bugs in this series. This is just the first step to do it. :) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com

[PATCH -tip v3 00/23] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-19 Thread Masami Hiramatsu
. - Add blacklist on modules support. - Add debugfs interface for blacklist. - Fix indent of the NOKPROBE_SYMBOL() by using tabs. - Fix NOKPROBE_SYMBOL() for expanding nested macro. - Update Documentations/kprobes.txt about blacklist. --- Masami Hiramatsu (23): kprobes: Prohibit probing

[PATCH -tip v3 06/23] kprobes/x86: Allow probe on some kprobe preparation functions

2013-11-19 Thread Masami Hiramatsu
events/kprobes/foo/enable # echo -:foo kprobe_events # head -n 20 trace # echo 0 events/kprobes/enable # echo kprobe_events # echo trace Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h

[PATCH -tip v3 04/23] kprobes: Support blacklist functions in module

2013-11-19 Thread Masami Hiramatsu
() Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da...@davemloft.net Cc: Rob Landley r...@landley.net Cc: Rusty Russell ru...@rustcorp.com.au --- Documentation/kprobes.txt |8 include/linux/module.h

[PATCH -tip v3 03/23] kprobes: Show blacklist entries via debugfs

2013-11-19 Thread Masami Hiramatsu
Show blacklist entries (function names with the address range) via /sys/kernel/debug/kprobes/blacklist. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da...@davemloft.net --- kernel/kprobes.c | 61

[PATCH -tip v3 05/23] kprobes: Use NOKPROBE_SYMBOL() in sample modules

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL() to protect handlers from kprobes in sample modules. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Ananth N Mavinakayanahalli ana...@in.ibm.com --- samples/kprobes/jprobe_example.c|1 + samples/kprobes/kprobe_example.c|3 +++ samples/kprobes

[PATCH -tip v3 01/23] kprobes: Prohibit probing on .entry.text code

2013-11-19 Thread Masami Hiramatsu
the blacklist. Changes from previous: - Introduce arch_within_kprobe_blacklist() which checks the address is within the .kprobes.text (generic,x86) or .entry.text (x86), for fixing build issue on !x86. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t

[PATCH -tip v3 02/23] kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist

2013-11-19 Thread Masami Hiramatsu
. Changes from previous version: - Rename in_nokprobes_functions to within_kprobe_blacklist and it returns a bool value istead of an error. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da...@davemloft.net Cc

[PATCH -tip v3 07/23] kprobes/x86: Use NOKPROBE_SYMBOL instead of __kprobes

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in x86 kprobes code. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu

[PATCH -tip v3 08/23] kprobes: Allow probe on some kprobe functions

2013-11-19 Thread Masami Hiramatsu
unregister_kprobe __unregister_kprobe_bottom unregister_kprobes __unregister_kprobe_top unregister_kretprobe unregister_kretprobe unregister_kretprobes unregister_kretprobes wait_for_kprobe_optimizer Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana

[PATCH -tip v3 11/23] ftrace/kprobes: Use NOKPROBE_SYMBOL macro in ftrace

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in ftrace. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip v3 10/23] ftrace/kprobes: Allow probing on some preparation functions

2013-11-19 Thread Masami Hiramatsu
. update_bitfield_fetch_param free_bitfield_fetch_param kprobe_register Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Steven Rostedt rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@redhat.com --- kernel/trace/trace_kprobe.c |2 +- kernel/trace

[PATCH -tip v3 12/23] x86/hw_breakpoint: Use NOKPROBE_SYMBOL macro in hw_breakpoint

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobe annotation in hw_breakpoint. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Andrew Morton

[PATCH -tip v3 14/23] x86/fault: Use NOKPROBE_SYMBOL macro in fault.c

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in fault.c. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip v3 15/23] x86/alternative: Use NOKPROBE_SYMBOL macro in alternative.c

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in alternative.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Jiri Kosina

[PATCH -tip v3 13/23] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in trap.c. This also applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip v3 17/23] x86/kvm: Use NOKPROBE_SYMBOL macro in kvm.c

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in kvm.c. This also adds kvm_read_and_reset_pf_reason in the blacklist because it can be called before do_page_fault. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner

[PATCH -tip v3 16/23] x86/nmi: Use NOKPROBE_SYMBOL macro for nmi handlers

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation for nmi handlers. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Peter

[PATCH -tip v3 18/23] x86/dumpstack: Use NOKPROBE_SYMBOL macro in dumpstack.c

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in dumpstack.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Andrew

[PATCH -tip v3 20/23] [BUGFIX] kprobes: Prohibit probing on func_ptr_is_kernel_text

2013-11-19 Thread Masami Hiramatsu
with CONFIG_DEBUG_NOTIFIERS=y. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Andrew Morton a...@linux-foundation.org Cc: Uwe Kleine-König u.kleine-koe...@pengutronix.de Cc: Borislav Petkov b...@suse.de Cc: Ingo Molnar mi...@kernel.org --- kernel/extable.c |2 ++ 1 file changed

[PATCH -tip v3 22/23] sched: Use NOKPROBE_SYMBOL macro in sched

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in sched/core.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ingo Molnar mi...@redhat.com Cc: Peter Zijlstra pet...@infradead.org --- kernel/sched/core.c |6 -- 1 file

[PATCH -tip v3 21/23] notifier: Use NOKPROBE_SYMBOL macro in notifier

2013-11-19 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in notifier. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- kernel/notifier.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/kernel

[PATCH -tip v3 23/23] kprobes/x86: Use kprobe_blacklist for .kprobes.text and .entry.text

2013-11-19 Thread Masami Hiramatsu
Use kprobe_blackpoint for blacklisting .entry.text and .kprobes.text instead of arch_within_kprobe_blacklist. This also makes them visible via (debugfs)/kprobes/blacklist. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

Re: Re: [PATCH -tip RFC v2 01/22] kprobes: Prohibit probing on .entry.text code

2013-11-16 Thread Masami Hiramatsu
(2013/11/16 2:46), Geert Uytterhoeven wrote: On Fri, Nov 15, 2013 at 5:43 PM, Steven Rostedt rost...@goodmis.org wrote: On Fri, 15 Nov 2013 04:53:18 + Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: .entry.text is a code area which is used for interrupt/syscall entries

[PATCH -tip RFC v2 01/22] kprobes: Prohibit probing on .entry.text code

2013-11-14 Thread Masami Hiramatsu
the blacklist. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Al Viro v...@zeniv.linux.org.uk Cc: Seiji Aguchi seiji.agu...@hds.com Cc

[PATCH -tip RFC v2 02/22] kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist

2013-11-14 Thread Masami Hiramatsu
. Changes from previous version: - fix indent of the macro by using tabs. - fix macro for expanding nested macro. - update Documentations/kprobes.txt Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da

[PATCH -tip RFC v2 00/22] kprobes: introduce NOKPROBE_SYMBOL() and general cleaning of kprobe blacklist

2013-11-14 Thread Masami Hiramatsu
nested macro. - Update Documentations/kprobes.txt about blacklist. --- Masami Hiramatsu (22): kprobes: Prohibit probing on .entry.text code kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist kprobes: Show blacklist entries via debugfs kprobes: Support blacklist functions

[PATCH -tip RFC v2 04/22] kprobes: Support blacklist functions in module

2013-11-14 Thread Masami Hiramatsu
To blacklist the functions in a module (e.g. user-defined kprobe handler and the functions invoked from it), expand blacklist support for modules. With this change, users can use NOKPROBE_SYMBOL() macro in their own modules. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc

[PATCH -tip RFC v2 03/22] kprobes: Show blacklist entries via debugfs

2013-11-14 Thread Masami Hiramatsu
Show blacklist entries (function names with the address range) via /sys/kernel/debug/kprobes/blacklist. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da...@davemloft.net --- kernel/kprobes.c | 61

[PATCH -tip RFC v2 05/22] kprobes: Use NOKPROBE_SYMBOL() in sample modules

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL() to protect handlers from kprobes in sample modules. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Ananth N Mavinakayanahalli ana...@in.ibm.com --- samples/kprobes/jprobe_example.c|1 + samples/kprobes/kprobe_example.c|3 +++ samples/kprobes

[PATCH -tip RFC v2 10/22] ftrace/kprobes: Allow probing on some preparation functions

2013-11-14 Thread Masami Hiramatsu
. update_bitfield_fetch_param free_bitfield_fetch_param kprobe_register Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Steven Rostedt rost...@goodmis.org Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@redhat.com --- kernel/trace/trace_kprobe.c |2 +- kernel/trace

[PATCH -tip RFC v2 06/22] kprobes/x86: Allow probe on some kprobe preparation functions

2013-11-14 Thread Masami Hiramatsu
events/kprobes/foo/enable # echo -:foo kprobe_events # head -n 20 trace # echo 0 events/kprobes/enable # echo kprobe_events # echo trace Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h

[PATCH -tip RFC v2 09/22] kprobes: Use NOKPROBE_SYMBOL macro instead of __kprobes

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: David S. Miller da...@davemloft.net --- kernel/kprobes.c | 67

[PATCH -tip RFC v2 11/22] ftrace/kprobes: Use NOKPROBE_SYMBOL macro in ftrace

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in ftrace. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip RFC v2 08/22] kprobes: Allow probe on some kprobe functions

2013-11-14 Thread Masami Hiramatsu
unregister_kprobe __unregister_kprobe_bottom unregister_kprobes __unregister_kprobe_top unregister_kretprobe unregister_kretprobe unregister_kretprobes unregister_kretprobes wait_for_kprobe_optimizer Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ananth N Mavinakayanahalli ana

[PATCH -tip RFC v2 07/22] kprobes/x86: Use NOKPROBE_SYMBOL instead of __kprobes

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in x86 kprobes code. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu

[PATCH -tip RFC v2 12/22] x86/hw_breakpoint: Use NOKPROBE_SYMBOL macro in hw_breakpoint

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobe annotation in hw_breakpoint. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Andrew Morton

[PATCH -tip RFC v2 14/22] x86/fault: Use NOKPROBE_SYMBOL macro in fault.c

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in fault.c. This applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip RFC v2 16/22] x86/nmi: Use NOKPROBE_SYMBOL macro for nmi handlers

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation for nmi handlers. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Peter

[PATCH -tip RFC v2 15/22] x86/alternative: Use NOKPROBE_SYMBOL macro in alternative.c

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in alternative.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Jiri Kosina

[PATCH -tip RFC v2 13/22] x86/trap: Use NOKPROBE_SYMBOL macro in trap.c

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in trap.c. This also applies __always_inline annotation for some cases, because NOKPROBE_SYMBOL() will inhibit inlining by referring the symbol address. Signed-off-by: Masami Hiramatsu masami.hiramatsu

[PATCH -tip RFC v2 17/22] x86/kvm: Use NOKPROBE_SYMBOL macro in kvm.c

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro for protecting functions from kprobes instead of __kprobes annotation in kvm.c. This also adds kvm_read_and_reset_pf_reason in the blacklist because it can be called before do_page_fault. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner

[PATCH -tip RFC v2 22/22] sched: Use NOKPROBE_SYMBOL macro in sched

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in sched/core.c. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Ingo Molnar mi...@redhat.com Cc: Peter Zijlstra pet...@infradead.org --- kernel/sched/core.c |6 -- 1 file

[PATCH -tip RFC v2 20/22] [BUGFIX] kprobes: Prohibit probing on func_ptr_is_kernel_text

2013-11-14 Thread Masami Hiramatsu
with CONFIG_DEBUG_NOTIFIERS=y. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Andrew Morton a...@linux-foundation.org Cc: Uwe Kleine-König u.kleine-koe...@pengutronix.de Cc: Borislav Petkov b...@suse.de Cc: Ingo Molnar mi...@kernel.org --- kernel/extable.c |2 ++ 1 file changed

[PATCH -tip RFC v2 21/22] notifier: Use NOKPROBE_SYMBOL macro in notifier

2013-11-14 Thread Masami Hiramatsu
Use NOKPROBE_SYMBOL macro to protect functions from kprobes instead of __kprobes annotation in notifier. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- kernel/notifier.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/kernel

[PATCH -tip RFC v2 19/22] [BUGFIX] kprobes/x86: Prohibit probing on debug_stack_*

2013-11-14 Thread Masami Hiramatsu
. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Borislav Petkov b...@suse.de Cc: Fenghua Yu fenghua...@intel.com Cc: Seiji Aguchi seiji.agu...@hds.com --- arch/x86/kernel/cpu

Re: Re: [PATCH -tip RFC 0/2] kprobes: introduce NOKPROBE_SYMBOL() and prohibit probing on .entry.text

2013-11-11 Thread Masami Hiramatsu
(2013/11/11 20:16), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Currently the blacklist is maintained by hand in kprobes.c which is separated from the function definition and is hard to catch up the kernel update. To solve this issue, I've tried

[PATCH -tip RFC 1/2] kprobes: Prohibit probing on .entry.text code

2013-11-08 Thread Masami Hiramatsu
the blacklist. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- arch/x86/kernel/entry_32.S | 33 - arch/x86/kernel/entry_64.S | 20 kernel/kprobes.c | 10 +- 3 files changed, 5 insertions(+), 58 deletions(-) diff

[PATCH -tip RFC 2/2] kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist

2013-11-08 Thread Masami Hiramatsu
. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- arch/x86/kernel/paravirt.c|4 ++ include/asm-generic/vmlinux.lds.h |9 include/linux/kprobes.h | 19 kernel/kprobes.c | 88 ++--- kernel

[PATCH -tip RFC 0/2] kprobes: introduce NOKPROBE_SYMBOL() and prohibit probing on .entry.text

2013-11-08 Thread Masami Hiramatsu
to ask again with actual implementation and plan. Thank you, --- Masami Hiramatsu (2): kprobes: Prohibit probing on .entry.text code kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist arch/x86/kernel/entry_32.S| 33 arch/x86/kernel/entry_64.S

Re: [PATCH V2 1/2] [BUGFIX] virtio/console: Quit from splice_write if pipe-nrbufs is 0

2013-07-19 Thread Masami Hiramatsu
(), but the region is out of bound. To avoid the case, a kernel should check whether pipe-nrbufs is empty or not when splice_write is executed in the virtio-console driver. Thank you for fixing it :) Reviewed-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Signed-off-by: Yoshihiro YUNOMAE

Re: [PATCH V2 2/2] [BUGFIX] virtio/console: Add pipe_lock/unlock for splice_write

2013-07-19 Thread Masami Hiramatsu
a locking problem for error Thanks, this looks good for me. Reviewed-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Signed-off-by: Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com Cc: Amit Shah amit.s...@redhat.com Cc: Arnd Bergmann a...@arndb.de Cc: Greg Kroah-Hartman gre

Re: [PATCH 1/3] virtio_console:Merge struct buffer_token into struct port_buffer

2012-09-26 Thread Masami Hiramatsu
, but I can change this to something like: alloc_size = sizeof(*buf) + sizeof(buf-sg) * max(nrbufs - 1, 1); You wouldn't need to change that. I think current code is enough simple and reasonable. :) Thanks! -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi

Re: [PATCH 1/3] virtio_console:Merge struct buffer_token into struct port_buffer

2012-09-25 Thread Masami Hiramatsu
amit.s...@redhat.com cc: Linus Walleij linus.wall...@linaro.org cc: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- drivers/char/virtio_console.c | 141 ++--- 1 files changed, 62 insertions(+), 79 deletions(-) diff --git a/drivers/char/virtio_console.c

Re: Re: [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-23 Thread Masami Hiramatsu
(2012/08/23 18:08), Steven Rostedt wrote: On Thu, 2012-08-23 at 12:00 +0900, Masami Hiramatsu wrote: (2012/08/23 11:01), Masami Hiramatsu wrote: (2012/08/22 22:41), Steven Rostedt wrote: On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: From: Masami Hiramatsu masami.hiramatsu

Re: [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-22 Thread Masami Hiramatsu
(2012/08/22 22:41), Steven Rostedt wrote: On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: From: Masami Hiramatsu masami.hiramatsu...@hitachi.com Count debugfs/tracing/per_cpu/cpu* to determine the number of CPUs. I'm curious, do you find that sysconf doesn't return

Re: [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-22 Thread Masami Hiramatsu
(2012/08/23 11:01), Masami Hiramatsu wrote: (2012/08/22 22:41), Steven Rostedt wrote: On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: From: Masami Hiramatsu masami.hiramatsu...@hitachi.com Count debugfs/tracing/per_cpu/cpu* to determine the number of CPUs. I'm curious, do you

Re: Re: [PATCH V2 0/6] virtio-trace: Support virtio-trace

2012-08-21 Thread Masami Hiramatsu
, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https

Re: Re: [RFC PATCH 1/6] virtio/console: Add splice_write support

2012-08-09 Thread Masami Hiramatsu
(2012/08/09 18:00), Amit Shah wrote: On (Tue) 24 Jul 2012 [11:37:07], Yoshihiro YUNOMAE wrote: From: Masami Hiramatsu masami.hiramatsu...@hitachi.com Enable to use splice_write from pipe to virtio-console port. This steals pages from pipe and directly send it to host. Note that this may

Re: Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-25 Thread Masami Hiramatsu
. Perhaps, in the analyzing phase (after tracing), we have to mix events again. At that time, we'll add some guest-ID for each event-ID, but it can be done offline. Best Regards, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E

Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Masami Hiramatsu
removing physical pages of the guest is hard to track and may involve a TLB flush per page, even if it is done in background. Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com

Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Masami Hiramatsu
options like guest-debugfs mount point, guest's serial channel pipe (or unix socket?), etc. However, it will be a small change. Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu