Re: [RFC PATCH 0/2] tracing: Teach FETCH_MTD_symbol to handle per-cpu data

2013-11-27 Thread Masami Hiramatsu
(2013/11/28 2:41), Oleg Nesterov wrote: On 11/27, Masami Hiramatsu wrote: (2013/11/27 2:43), Oleg Nesterov wrote: This doesn't allow to read the data from other CPUs, but at least the changes are simple and this_cpu_ is better than the reading from the obviously wrong address. Yeah

Re: Re: [PATCH 02/17] tracing/probes: Fix basic print type functions

2013-11-27 Thread Masami Hiramatsu
(2013/11/27 23:39), Namhyung Kim wrote: Hi Masami, 2013-11-27 (수), 20:57 +0900, Masami Hiramatsu: (2013/11/27 15:19), Namhyung Kim wrote: -DEFINE_BASIC_PRINT_TYPE_FUNC(u8, %x, unsigned int) -DEFINE_BASIC_PRINT_TYPE_FUNC(u16, %x, unsigned int) -DEFINE_BASIC_PRINT_TYPE_FUNC(u32, %lx

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: 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: 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 -- To unsubscribe from this list: send

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-01 Thread Masami Hiramatsu
, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 1/2] perf probe: Improve error message when function not found

2013-12-01 Thread Masami Hiramatsu
variable? Hmm, indeed current message is too less information, but your message looks wired. I think just showing Failed to find requested symbol in %s is enough. :) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-01 Thread Masami Hiramatsu
, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

[PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it

2013-10-11 Thread Masami Hiramatsu
Fix perf probe --list to initialize fname local var always before use it. This may cause a SEGV if there is a probe which is in the function body but not in any inline function. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul

Re: [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it

2013-10-11 Thread Masami Hiramatsu
Hi Arnaldo, I've found a bug in my previous patch which was already picked in the perf/urgent branch. The buggy commit id is e08cfd4bda7683cdbe6971c26cf23e2afdb1e7a8 And this is not related to the previous series of perf probe updates. Thank you, (2013/10/11 21:23), Masami Hiramatsu wrote

Re: [PATCH v10 11/12] tracing: fix tracing_snapshot kerneldoc

2013-10-11 Thread Masami Hiramatsu
:) Reviewed-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com --- kernel/trace/trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5aa8f80..81d95bf 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace

Re: [PATCH v10 12/12] tracing: define trace_dump_stack() if !CONFIG_STACKTRACE

2013-10-11 Thread Masami Hiramatsu
that the CONFIG_STACKTRACE is forced on if it is required. And if you have found such case, IMHO, we should turn on the CONFIG_STACKTRACE in Kconfig. (Also, if it is not related to this series, it should be reported as a separated bugfix :) ) Thank you, -- Masami HIRAMATSU IT Management Research

Re: [PATCH v10 04/12] tracing: Add 'snapshot' event trigger command

2013-10-11 Thread Masami Hiramatsu
; +} +EXPORT_SYMBOL_GPL(tracing_alloc_snapshot); Out of curiously, why this symbol is exported to modules? The functions which are called directly from trace_event macros should be exported because those macros can be used in module code, but I couldn't find this in such code, at a glance. Thank you, -- Masami

Re: [PATCH v10 04/12] tracing: Add 'snapshot' event trigger command

2013-10-15 Thread Masami Hiramatsu
(2013/10/11 23:04), Tom Zanussi wrote: On Fri, 2013-10-11 at 22:47 +0900, Masami Hiramatsu wrote: (2013/10/11 9:48), Tom Zanussi wrote: /** + * tracing_alloc_snapshot - allocate snapshot buffer. + * + * This only allocates the snapshot buffer if it isn't already + * allocated - it doesn't

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-09 Thread Masami Hiramatsu
on the production system). I think under such situation kgdb operator must have full control of the system, and he can (and has to) avoid such kind of race. Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu

Re: [PATCH] uprobes: Add uprobe_task-dup_work/dup_addr

2013-11-10 Thread Masami Hiramatsu
need to use such union... Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: Re: [PATCH] uprobes: Add uprobe_task-dup_work/dup_addr

2013-11-10 Thread Masami Hiramatsu
(2013/11/11 2:28), Oleg Nesterov wrote: On 11/11, Masami Hiramatsu wrote: (2013/11/09 4:00), Oleg Nesterov wrote: uprobe_task-vaddr is a bit strange. First of all it is not really needed, we can move it into arch_uprobe_task. The generic code uses it only to pass the additional argument

Re: [PATCH] uprobes: Add uprobe_task-dup_work/dup_addr

2013-11-10 Thread Masami Hiramatsu
handlers could use it to communicate with call_fetch() methods. OK, those are used in the different phase as a scratchpad. Signed-off-by: Oleg Nesterov o...@redhat.com Reviewed-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Thanks! --- include/linux/uprobes.h | 21

Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-10 Thread Masami Hiramatsu
(2013/11/11 14:39), Sandeepa Prabhu wrote: On 9 November 2013 14:40, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/09 1:56), Will Deacon wrote: Hi Sandeepa, On Thu, Oct 17, 2013 at 12:17:47PM +0100, Sandeepa Prabhu wrote: Add support for basic kernel probes(kprobes), jump

Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/11 16:54), Masami Hiramatsu wrote: In fact, how do you avoid a race with hardware breakpoints? E.g., somebody places a hardware breakpoint on an instruction in the kernel for which kprobes has patched in a brk. We take the hardware breakpoint, disable the breakpoint and set up

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

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/11 19:58), Will Deacon wrote: On Mon, Nov 11, 2013 at 10:51:52AM +, Masami Hiramatsu wrote: (2013/11/11 16:54), Masami Hiramatsu wrote: In fact, how do you avoid a race with hardware breakpoints? E.g., somebody places a hardware breakpoint on an instruction in the kernel

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
, it seems that this also has some works around instruction manipulation (and confusable filenames...) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
(2013/11/12 17:44), Sandeepa Prabhu wrote: On 12 November 2013 12:57, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So

Re: Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
, and if I found such problem, I added it on the blacklist. Currently I run the test only on x86, so perhaps, other arch does not have well tested yet. Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
it been tested recently with sample modules or perf/ptrace? I've tested on x86 with the latest tip-tree kernel and it worked. Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
, perhaps we can do some magic in post-build script as kallsyms does. 1) make an object file 2) extract symbols from the file 3) put the symbols into data section as a list of strings 4) analyze the list at boot (init) time by using kallsyms how about this? :) Thank you, -- Masami HIRAMATSU

Re: [PATCH v2 10/13] kprobes: Remove uneeded kernel dependency on struct arch_specific_insn

2013-11-13 Thread Masami Hiramatsu
; /* copy of the original instruction */ +#ifdef CONFIG_KPROBES struct arch_specific_insn ainsn; +#else + int ainsn; +#endif /* * Indicates various status flags. -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama

Re: Re: [PATCH v2 10/13] kprobes: Remove uneeded kernel dependency on struct arch_specific_insn

2013-11-13 Thread Masami Hiramatsu
on each feature who is responsible for it (even it is a piece of code), and scripts/get_maintainers.pl gives you who are. Srikar, Oleg, I think it's a good time to merge such arch_specific mechanism of uprobes and kprobes. Would you think we can do similar thing on x86 too? Thank you, -- Masami

Re: [PATCH v2] ftrace/x86: Load ftrace_ops in parameter not the variable holding it

2013-11-13 Thread Masami Hiramatsu
of the function tracing callback. I see, function_trace_op is just a pointer to an actual ftrace_ops. :) And I have ensured this change doesn't affect ftrace-kprobes since it doesn't use this parameter. Signed-off-by: Steven Rostedt rost...@goodmis.org Reviewed-by: Masami Hiramatsu masami.hiramatsu

Re: [PATCH v3 1/8] x86: allow to handle errors in text_poke function family

2013-11-14 Thread Masami Hiramatsu
permission error). And we are not sure the code is same as old one. (only compared with what we expected) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from

Re: [PATCH v3 2/8] x86: allow to call text_poke_bp during boot

2013-11-14 Thread Masami Hiramatsu
cause a deadlock, see the warning in smp_call_function_many, kernel/smp.c:371. The change is inspired by the code in arch/x86/kernel/ftrace.c. Looks good for me :) Reviewed-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Signed-off-by: Petr Mladek pmla...@suse.cz --- arch/x86

Re: [PATCH v3 4/8] x86: speed up int3-based patching using direct write

2013-11-14 Thread Masami Hiramatsu
() and set_all_modules_text_rw() OK, I got the reason why we can do it. But if so, we should change all existing caller of text_poke_bp() to call it in this patch, or they must fail at this point. Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd

Re: [PATCH v3 4/8] x86: speed up int3-based patching using direct write

2013-11-14 Thread Masami Hiramatsu
(2013/11/14 21:46), Petr Mladek wrote: Masami Hiramatsu píše v Čt 14. 11. 2013 v 20:36 +0900: (2013/11/14 19:41), Petr Mladek wrote: @@ -837,7 +882,7 @@ static void recover_iter(struct text_poke_bp_iter *iterator, } /* Finally, put back the first byte from the old code

Re: perf/tracepoint: another fuzzer generated lockup

2013-11-14 Thread Masami Hiramatsu
-tracer last night, that was amazing :) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

[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 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 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 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 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 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 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 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 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 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 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 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 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

[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 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 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 18/22] x86/dumpstack: Use NOKPROBE_SYMBOL macro in dumpstack.c

2013-11-14 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 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 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 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 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 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

Re: Re: Re: [PATCH v2 10/13] kprobes: Remove uneeded kernel dependency on struct arch_specific_insn

2013-11-15 Thread Masami Hiramatsu
(2013/11/14 23:15), Jon Medhurst (Tixy) wrote: On Thu, 2013-11-14 at 11:02 +0900, Masami Hiramatsu wrote: (2013/11/14 2:13), Jon Medhurst (Tixy) wrote: On Tue, 2013-10-15 at 17:04 -0400, David Long wrote: From: David A. Long dave.l...@linaro.org Instead of depending on include/asm/kprobes.h

Re: Re: [PATCH v2 10/13] kprobes: Remove uneeded kernel dependency on struct arch_specific_insn

2013-11-15 Thread Masami Hiramatsu
(2013/11/15 5:33), David Long wrote: On 11/14/13 09:15, Jon Medhurst (Tixy) wrote: On Thu, 2013-11-14 at 11:02 +0900, Masami Hiramatsu wrote: (2013/11/14 2:13), Jon Medhurst (Tixy) wrote: On Tue, 2013-10-15 at 17:04 -0400, David Long wrote: From: David A. Long dave.l...@linaro.org Instead

Re: perf/tracepoint: another fuzzer generated lockup

2013-11-16 Thread Masami Hiramatsu
(2013/11/15 23:28), Frederic Weisbecker wrote: On Fri, Nov 15, 2013 at 09:15:21AM -0500, Steven Rostedt wrote: On Fri, 15 Nov 2013 13:28:33 +0100 Peter Zijlstra pet...@infradead.org wrote: On Fri, Nov 15, 2013 at 10:16:18AM +0900, Masami Hiramatsu wrote: Kprobes itself can detect nested call

[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 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 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 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 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 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 19/23] [BUGFIX] kprobes/x86: Prohibit probing on debug_stack_*

2013-11-19 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

[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 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 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

[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 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 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 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 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 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 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 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

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 -- To unsubscribe from this list: send

Re: Re: [PATCH 1/2] perf probe: Improve error message when function not found

2013-12-02 Thread Masami Hiramatsu
(2013/12/02 23:52), David Ahern wrote: On 12/1/13, 10:59 PM, Masami Hiramatsu wrote: (2013/12/02 9:07), David Ahern wrote: When requesting a function from a userspace library the error message to the user is less than helpful. e.g., perf probe -x /lib64/libpthread-2.14.90.so

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-03 Thread Masami Hiramatsu
(2013/12/03 2:55), David Ahern wrote: On 12/2/13, 7:49 AM, David Ahern wrote: On 12/1/13, 11:15 PM, Masami Hiramatsu wrote: (2013/12/02 9:07), David Ahern wrote: Allow user to specify an address within an executable. This is useful, for example, in probing local functions. If the function

Re: [PATCH/RFC 17/17] tracing/uprobes: Add @+file_offset fetch method

2013-12-03 Thread Masami Hiramatsu
argument to receive 'void *priv' and make it set only for uprobes so that we can determine the arg is for kprobes or uprobes easily. Suggested-by: Oleg Nesterov o...@redhat.com Cc: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Srikar Dronamraju sri...@linux.vnet.ibm.com Cc: Oleg

Re: [RFC PATCH tip 0/5] tracing filters with BPF

2013-12-03 Thread Masami Hiramatsu
-bit registers. That is the main difference. Old BPF was using jt/jf fields for jump-insn only. New BPF combines them into generic 'off' field for jump and non-jump insns. k==imm field has the same meaning. Looks very interesting. :) Thank you! -- Masami HIRAMATSU IT Management Research Dept

Re: [RFC PATCH tip 4/5] use BPF in tracing filters

2013-12-03 Thread Masami Hiramatsu
, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo

Re: [RFC PATCH tip 0/5] tracing filters with BPF

2013-12-03 Thread Masami Hiramatsu
,... I want to improve that after first step is done. Actually, that part is done by the perf-probe and ftrace dynamic events (kernel/trace/trace_probe.c). I think this generic BPF is good for re-implementing fetch methods. :) Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-03 Thread Masami Hiramatsu
(2013/12/04 0:58), David Ahern wrote: On 12/3/13, 2:24 AM, Masami Hiramatsu wrote: I don't want to make perf-probe just a wrapper of the ftrace dynamic event interface, because it doesn't add any value for users. Sure it does -- a consistent user experience in using a single command (perf

Re: [PATCH 1/2] perf probe: Improve error message when function not found

2013-12-03 Thread Masami Hiramatsu
(2013/12/04 0:15), David Ahern wrote: On 12/2/13, 10:12 PM, Masami Hiramatsu wrote: That needs to be explicitly stated in the error message -- only global symbols may be given. Ah, I see. In that case, I think the variable is not a correct word, the symbol is better, because perf probe can

[PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs

2013-12-03 Thread Masami Hiramatsu
NOKPROBE_SYMBOL() macro just saves the address of non-probe-able symbols. --- Masami Hiramatsu (6): kprobes: Prohibit probing on .entry.text code kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist [BUGFIX] kprobes/x86: Prohibit probing on debug_stack_* [BUGFIX] x86: Prohibit

[PATCH -tip v4 6/6] [RFC] kprobes/x86: Call exception handlers directly from do_int3/do_debug

2013-12-03 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: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Andi Kleen a...@linux.intel.com Cc: Steven Rostedt rost...@goodmis.org Cc: Sasha

[PATCH -tip v4 4/6] [BUGFIX] x86: Prohibit probing on native_set_debugreg

2013-12-03 Thread Masami Hiramatsu
Since the kprobes uses do_debug for single stepping, functions called from do_debug before notify_die must not be probed. This prohibits probing on native_set_debugreg which is used in do_debug. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Jeremy Fitzhardinge jer

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

2013-12-03 Thread Masami Hiramatsu
the address of given function instead of defining a data structure in NOKPROBE_SYMBOL(). - Add _ASM_NOKPROBE macro support for x86. 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

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

2013-12-03 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 v4 5/6] [BUGFIX] x86: Prohibit probing on thunk functions and restore

2013-12-03 Thread Masami Hiramatsu
thunk/restore functions are also used for tracing irqoff etc. and those are involved in kprobe's exception handling. Prohibit probing on them to avoid kernel crash. Signed-off-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

[PATCH -tip v4 3/6] [BUGFIX] kprobes/x86: Prohibit probing on debug_stack_*

2013-12-03 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: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs

2013-12-03 Thread Masami Hiramatsu
(2013/12/04 11:54), Sandeepa Prabhu wrote: On 4 December 2013 06:58, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Hi, Here is the version 4 of NOKPORBE_SYMBOL series. In this version, I removed the cleanup patches and add bugfixes I've found, since those bugs will be critical

Re: [PATCH 2/2] perf probe: Allow user to specify address within executable

2013-12-03 Thread Masami Hiramatsu
(2013/12/04 10:44), David Ahern wrote: On 12/3/13, 6:22 PM, Masami Hiramatsu wrote: I figured out what you meant by uprobe_events interface yesterday. If I have to go to that interface for even 1 function I would do it for all -- from a user perspective it is just simpler to have 1 command

Re: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs

2013-12-04 Thread Masami Hiramatsu
(2013/12/04 17:45), Ingo Molnar wrote: * Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Hi, Here is the version 4 of NOKPORBE_SYMBOL series. In this version, I removed the cleanup patches and add bugfixes I've found, since those bugs will be critical. Rest of the cleanup

Re: Re: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs

2013-12-04 Thread Masami Hiramatsu
(2013/12/04 17:46), Sandeepa Prabhu wrote: On 4 December 2013 13:09, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/12/04 11:54), Sandeepa Prabhu wrote: On 4 December 2013 06:58, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: Hi, Here is the version 4

Re: [RFC PATCH tip 4/5] use BPF in tracing filters

2013-12-04 Thread Masami Hiramatsu
(2013/12/04 10:11), Steven Rostedt wrote: On Wed, 04 Dec 2013 09:48:44 +0900 Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/12/03 13:28), Alexei Starovoitov wrote: Such filters can be written in C and allow safe read-only access to any kernel data structure. Like systemtap

<    1   2   3   4   5   6   7   8   9   10   >