[PATCH -tip 1/3] [CLEANUP] kprobes/x86: Remove an incorrect comment about int3 in NMI/MCE

2013-07-18 Thread Masami Hiramatsu
Remove a comment about an int3 issue in NMI/MCE, since the commit 3f3c8b8c already fixed that. Keeping this incorrect comment can mislead developers. Signed-off-by: Masami Hiramatsu --- arch/x86/kernel/kprobes/opt.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/arch/x86

[PATCH -tip 0/3] kprobes, x86: Move optprobe on top of int3-based instruction patching

2013-07-18 Thread Masami Hiramatsu
from alternative.c. As a side effect, it also fixes a Kconfig warning about CONFIG_STOP_MACHINE dependency confliction. Thank you, --- Masami Hiramatsu (3): [CLEANUP] kprobes/x86: Remove an incorrect comment about int3 in NMI/MCE kprobes/x86: Use text_poke_bp() instead of text_poke_smp

[PATCH -tip 3/3] x86: Remove unused text_poke_smp and text_poke_smp_batch

2013-07-18 Thread Masami Hiramatsu
Since introducing the text_poke_bp for all text_poke_smp* callers, text_poke_smp* are now unused. This basically reverts 3d55cc8a, 7deb18dc and related commits. This also fixes a Kconfig dependency issue on STOP_MACHINE in the case of CONFIG_SMP && !CONFIG_MODULE_UNLOAD. Signed-off-by

[PATCH -tip 2/3] kprobes/x86: Use text_poke_bp() instead of text_poke_smp*()

2013-07-18 Thread Masami Hiramatsu
Use text_poke_bp() for optimizing kprobes instead of text_poke_smp*(). Since the number of kprobes are usually not so much (<100) and text_poke_bp() is much lighter than text_poke_smp(), this just stops to use batch processing. Signed-off-by: Masami Hiramatsu --- arch/x86/kernel/kpro

Re: [RFC PATCH V2] tracing/kprobe: Wait for disabling all running kprobe handlers

2013-07-18 Thread Masami Hiramatsu
(2013/07/16 3:20), Oleg Nesterov wrote: > On 07/09, Masami Hiramatsu wrote: >> >> Wait for disabling all running kprobe handlers when a kprobe >> event is disabled, since the caller, trace_remove_event_call() >> supposes that a removing event is disabled completel

Re: Re: [RFC PATCH V2] tracing: Check f_dentry before accessing event_file/call in inode->i_private

2013-07-18 Thread Masami Hiramatsu
(2013/07/18 23:51), Oleg Nesterov wrote: > On 07/18, Masami Hiramatsu wrote: >> >> (2013/07/17 23:51), Oleg Nesterov wrote: >>> Well, perhaps you are right... But this TRACE_EVENT_FL_REF_MASK code >>> is new too, it is not that we only need a small fixlets to fin

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

2013-07-19 Thread Masami Hiramatsu
le driver tries to touch scatterlist structure sgl in > sg_init_table(), 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

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

2013-07-19 Thread Masami Hiramatsu
Code: 49 8b 87 80 00 00 00 4c 8d 24 d0 8b 53 04 41 8b 44 24 0c 4d 8b 6c 24 > 10 39 d0 89 03 76 02 89 13 49 8b 44 24 10 4c 89 e6 4c 89 ff 50 18 85 c0 > 0f 85 aa 00 00 00 48 89 da 4c 89 e6 4c 89 ff 41 > RIP [] splice_from_pipe_feed+0x6f/0x130 > RSP > CR2: 0018 > ---[ end trace 24

Re: [PATCH v3 0/9] tracing: trace event triggers

2013-07-22 Thread Masami Hiramatsu
(2013/07/20 0:09), Tom Zanussi wrote: > Hi, > > This is v3 of the trace event triggers patchset, addressing comments > from Masami Hiramatsu, zhangwei(Jovi), and Steve Rostedt. Steven, Oleg, would you think this can go at this time? Or Tom is better to wait for Oleg's bugfix? I&

Re: [PATCH v3 1/9] tracing: Add support for SOFT_DISABLE to syscall events

2013-07-22 Thread Masami Hiramatsu
,6 +467,7 @@ static void unreg_event_syscall_exit(struct > ftrace_event_file *file, > mutex_lock(&syscall_trace_lock); > tr->sys_refcount_exit--; > clear_bit(num, tr->enabled_exit_syscalls); > + rcu_assign_pointer(tr->exit_syscall_files[num], NULL);

Re: Re: [PATCH -tip 3/3] x86: Remove unused text_poke_smp and text_poke_smp_batch

2013-07-22 Thread Masami Hiramatsu
t; incomplete type > arch/x86/kernel/kprobes/opt.c:396:6: error: dereferencing pointer to > incomplete type Hmm, setup_optimized_kprobes is already removed by 2/3 (this is actually a series of tightly coupled patches). Could you check your working tree? Thank you, -- Masami HIRAMATSU IT

Re: Re: [PATCH -tip 3/3] x86: Remove unused text_poke_smp and text_poke_smp_batch

2013-07-22 Thread Masami Hiramatsu
(2013/07/22 17:21), Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> >> * Masami Hiramatsu wrote: >> >>> Since introducing the text_poke_bp for all text_poke_smp* >>> callers, text_poke_smp* are now unused. This basically >>> reverts 3d5

Re: [RFC PATCH V2] tracing: Check f_dentry before accessing event_file/call in inode->i_private

2013-07-22 Thread Masami Hiramatsu
(2013/07/19 22:33), Oleg Nesterov wrote: > On 07/19, Masami Hiramatsu wrote: >> >> (2013/07/18 23:51), Oleg Nesterov wrote: >>> It removes trace_array_get/put from tracing_open_generic_file() and >>> tracing_release_generic_file(). This assumes that "call-

Re: [PATCH -tip 3/3] x86: Remove unused text_poke_smp and text_poke_smp_batch

2013-07-22 Thread Masami Hiramatsu
(2013/07/22 19:01), Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > >> (2013/07/22 17:21), Ingo Molnar wrote: >>> >>> * Ingo Molnar wrote: >>> >>>> >>>> * Masami Hiramatsu wrote: >>>> >>>>> Si

Re: [PATCH v3 3/9] tracing: add 'traceon' and 'traceoff' event trigger commands

2013-07-22 Thread Masami Hiramatsu
= event_trigger_callback, > + .reg = register_trigger, > + .unreg = unregister_trigger, > + .get_trigger_ops= onoff_get_trigger_ops, > +}; > + > +static __init void unregister_trigger_traceon_traceoff_cmds(void) > +{ > +

Re: [PATCH v3 2/9] tracing: add basic event trigger framework

2013-07-22 Thread Masami Hiramatsu
+ goto out_unlock; > + } > + } > + out_unlock: > + mutex_unlock(cmd_list_mutex); > + > + return ret; > +} OK, it seems that this is used only for rollback process in __init functions. If so, it should have __init (and a comment), or we

Re: [PATCH -tip/x86/jumplabel] x86: call out into int3 handler directly instead of using notifier

2013-07-22 Thread Masami Hiramatsu
LOW_LEVEL_TRAP > if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP, > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index d6db7bd..bddf3b2 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -1709,7 +1709,7 @@ EXPORT_SYMBOL_GPL(unregist

Re: Re: [PATCH -tip/x86/jumplabel] x86: call out into int3 handler directly instead of using notifier

2013-07-22 Thread Masami Hiramatsu
nt state again. I hope to pull entire of this series in :) > > I pinged Ingo about this: > > https://lkml.org/lkml/2013/7/22/281 > > but the branch still seems to be in an odd state, containing last patch of > Masami's series. > > Thanks in advance for fix

Re: Re: PATCH? debugfs_remove_recursive() must not rely on list_empty(d_subdirs)

2013-07-26 Thread Masami Hiramatsu
lock(&parent->d_inode->i_mutex); __debugfs_remove(child, parent); if (child != dentry) goto restart; > mutex_unlock(&parent->d_inode->i_mutex); > simple_release_fs(&debugfs_mount, &debugfs_mount_count); > } It's just an

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

2013-08-09 Thread Masami Hiramatsu
tems. > > Anyway, it'd be better if we have exact format and type cast for each > types on both of 32- and 64-bit systems. In fact, the only difference > is on s64/u64 types. > Acked-by: Masami Hiramatsu Thank you! > Cc: Srikar Dronamraju > Cc: Oleg Nesterov >

Re: [PATCH 03/13] tracing/kprobes: Make stack and memory fetch functions static

2013-08-09 Thread Masami Hiramatsu
(2013/08/09 16:35), Namhyung Kim wrote: > Hi Masami-san, > > On Mon, 05 Aug 2013 18:04:09 +0900, Masami Hiramatsu wrote: >> (2013/07/31 18:03), Namhyung Kim wrote: >>> From: Namhyung Kim >>> >>> Those fetch functions need to be implemented different

Re: [PATCH 04/13] tracing/kprobes: Add fetch{,_size} member into deref fetch method

2013-08-09 Thread Masami Hiramatsu
t; access methods for supporting uprobes. > Looks OK for me :) Acked-by: Masami Hiramatsu > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhangwei(Jovi) > Cc: Arnaldo Carvalho de Melo > Signed-off-by: Hyeoncheol Lee > [namhy...@kernel.org: Split original patch in

Re: [PATCH 05/13] tracing/kprobes: Staticize stack and memory fetch functions

2013-08-09 Thread Masami Hiramatsu
ly. Right ;) Acked-by: Masami Hiramatsu > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhangwei(Jovi) > Cc: Arnaldo Carvalho de Melo > Signed-off-by: Namhyung Kim > --- > kernel/trace/trace_kprobe.c | 8 > kernel/trace/trace_probe.h | 8 &g

Re: [PATCH 06/13] tracing/kprobes: Factor out struct trace_probe

2013-08-09 Thread Masami Hiramatsu
(2013/08/09 17:45), Namhyung Kim wrote: > From: Namhyung Kim > > There are functions that can be shared to both of kprobes and uprobes. > Separate common data structure to struct trace_probe and use it from > the shared functions. > Acked-by: Masami Hiramatsu Thank

Re: [PATCH 07/13] tracing/uprobes: Convert to struct trace_probe

2013-08-09 Thread Masami Hiramatsu
(2013/08/09 17:45), Namhyung Kim wrote: > From: Namhyung Kim > > Convert struct trace_uprobe to make use of the common trace_probe > structure. > Looks good for me. Reviewed-by: Masami Hiramatsu Thanks! > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhang

Re: [PATCH 08/13] tracing/kprobes: Move common functions to trace_probe.h

2013-08-09 Thread Masami Hiramatsu
(2013/08/09 17:45), Namhyung Kim wrote: > From: Namhyung Kim > > The __get_data_size() and store_trace_args() will be used by uprobes > too. Move them to a common location. > Acked-by: Masami Hiramatsu Thanks! > Cc: Masami Hiramatsu > Cc: Srikar Dronamraju >

Re: [PATCH 10/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-08-09 Thread Masami Hiramatsu
;d better add to patch description why previously this is not needed, and your series needs it too. :) Thank you, > Cc: Masami Hiramatsu > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhangwei(Jovi) > Cc: Arnaldo Carvalho de Melo > Signed-off-by: Nam

Re: [PATCH 11/13] tracing/kprobes: Add priv argument to fetch functions

2013-08-09 Thread Masami Hiramatsu
her story. :) I'd rather increase flexibility in this series. Acked-by: Masami Hiramatsu Thank you! > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhangwei(Jovi) > Cc: Arnaldo Carvalho de Melo > Signed-off-by: Namhyung Kim > --- > kernel/trace/trace_kprobe.c | 32

Re: [PATCH 13/13] tracing/uprobes: Add support for full argument access methods

2013-08-09 Thread Masami Hiramatsu
l accept now and what is not? And also, you should update Documentation/trace/uprobetracer.txt according to your effort too. :) Thank you, > Original-patch-by: Hyeoncheol Lee > Cc: Masami Hiramatsu > Cc: Srikar Dronamraju > Cc: Oleg Nesterov > Cc: zhangwei(Jovi) > Cc: Arna

Re: [PATCH] tile: support kprobes on tilegx

2013-08-11 Thread Masami Hiramatsu
_pc + 8; > +} > + I recommend you to fix that, at least filter out non-supported instructions by arch_prepare_kprobe(), because no other users don't know which instruction they can probe. :) Thank you again! -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Cent

Re: Re: kprobing "hash_64.constprop.26" crashes the system, recursion through get_kprobe?

2013-02-28 Thread Masami Hiramatsu
202 R12: 7f4aef8e3f68 >> R13: 7f4af0a39270 R14: 7f4af0a38090 R15: >> ORIG_RAX: 00af CS: e033 SS: e02b >> >> >> It seems that the recursion occurs even before register_kprobe >> returns. I a

Re: Re: kprobing "hash_64.constprop.26" crashes the system, recursion through get_kprobe?

2013-03-01 Thread Masami Hiramatsu
(2013/03/01 17:43), Timo Juhani Lindfors wrote: > Masami Hiramatsu writes: >>> I am unable to recreate this problem on a fedora system; hash_64 is >>> inlined AFAICS. > > Thanks testing. How does the disassembly of get_kprobes look for you? Actually, there is no "

Re: Re: Re: kprobing "hash_64.constprop.26" crashes the system, recursion through get_kprobe?

2013-03-01 Thread Masami Hiramatsu
(2013/03/01 19:54), Masami Hiramatsu wrote: > Actually, __kprobes is used much more than we need, because that > is safer (and also, that is used just for marking functions > related to kprobes). > > Only what functions we need to mark __kprobes is the functions > called

[PATCH 0/3][BUGFIX] tracing/kprobe: memory barrier related bugfixes

2013-05-13 Thread Masami Hiramatsu
Hi, Here are three patches for fixing rcu memory barrier related issue and sparse warnings, which I was made on previous series. --- Masami Hiramatsu (3): [BUGFIX] tracing/kprobes: Use rcu_dereference_raw for tp->files [CLEANUP/SPARSE] tracing/kprobes: Fix a sparse warning

[PATCH 1/3] [BUGFIX] tracing/kprobes: Use rcu_dereference_raw for tp->files

2013-05-13 Thread Masami Hiramatsu
Use rcu_dereference_raw() for accessing tp->files. Because the write-side uses rcu_assign_pointer() for memory barrier, the read-side also has to use rcu_dereference_raw() with read memory barrier. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Mol

[PATCH 3/3] [CLEANUP/SPARSE] tracing/kprobes: Make print_*probe_event static

2013-05-13 Thread Masami Hiramatsu
According to sparse warning, print_*probe_event static because those functions are not directly called from outside. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar --- kernel/trace/trace_kprobe.c |4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/3] [CLEANUP/SPARSE] tracing/kprobes: Fix a sparse warning for incorrect type in assignment

2013-05-13 Thread Masami Hiramatsu
Fix a sparse warning about the rcu operated pointer is defined without __rcu address space. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar --- kernel/trace/trace_kprobe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel

[PATCH 0/5] Add glob pattern matching support on trigger and kprobe-event

2013-05-16 Thread Masami Hiramatsu
ng. I don't care about the speed of matching because the all of the matching which I've introduced in this series are done on slow-path. --- Masami Hiramatsu (5): [BUGFIX] tracing: Returns -EBUSY when event_enable_func fails to get module perf: Reorder parameters of strglob

[PATCH 1/5] [BUGFIX] tracing: Returns -EBUSY when event_enable_func fails to get module

2013-05-16 Thread Masami Hiramatsu
y it fails is under removing module at that time. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar --- kernel/trace/trace_events.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trac

[PATCH 2/5] perf: Reorder parameters of strglobmatch

2013-05-16 Thread Masami Hiramatsu
-off-by: Masami Hiramatsu Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Irina Tirdea Cc: Pekka Enberg Cc: Borislav Petkov Cc: David Ahern --- tools/perf/util/parse-events.c | 14 +++--- tools/perf/util/probe

[PATCH 3/5] lib/string: Add a generic wildcard string matching function

2013-05-16 Thread Masami Hiramatsu
Add strglobmatch() for generic wildcard string matching. This code is originally from perf-tools. For porting in the kernel, the limitation of the number of wildcards is introduced, because of the limitation of the stack. Signed-off-by: Masami Hiramatsu Cc: Andrew Morton Cc: Akinobu Mita Cc

[PATCH 5/5] tracing: Support enable/disable multiple events trigger by wild cards

2013-05-16 Thread Masami Hiramatsu
ble:0* events/block/block_sleeprq/enable:0* events/irq/irq_handler_entry/enable:0* events/irq/irq_handler_exit/enable:0* events/irq/softirq_entry/enable:0* events/irq/softirq_exit/enable:0* events/irq/softirq_raise/enable:0* Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbec

[PATCH 4/5] tracing/kprobes: Allow user to delete kprobe events by wild cards

2013-05-16 Thread Masami Hiramatsu
es/p_vfs_symlink_0 vfs_symlink p:kprobes/p_vfs_symlink_5 vfs_symlink+5 p:kprobes/p_vfs_read_0 vfs_read # echo -:kprobes/\*vfs_symlink_\* >> kprobe_events # cat kprobe_events p:kprobes/p_vfs_read_0 vfs_read Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Mo

Re: [PATCH 3/4] uprobes/tracing: Kill the pointless local_save_flags/preempt_count calls

2013-04-08 Thread Masami Hiramatsu
(2013/04/06 0:01), Oleg Nesterov wrote: > On 04/05, Masami Hiramatsu wrote: >> >> Acked-by: Masami Hiramatsu > > Thanks! > > Masami, perhaps you can also answer the question I asked in 0/4 > marc.info/?l=linux-kernel&m=136458107403835 ? > > Of

Re: [PATCH v3 1/4] kprobes: delay blacklist symbol lookup until we actually need it

2013-04-08 Thread Masami Hiramatsu
(2013/04/05 22:26), Oskar Andero wrote: > From: Toby Collett > > The symbol lookup can take a long time and kprobes is > initialised very early in boot, so delay symbol lookup > until the blacklist is first used. Acked-by: Masami Hiramatsu Thanks! > > Cc: Masami Hir

Re: [PATCH v3 2/4] kprobes: split blacklist into common and arch

2013-04-08 Thread Masami Hiramatsu
in the arch/ directory. Looks good for me:) Acked-by: Masami Hiramatsu Thank you! > > Cc: Masami Hiramatsu > Cc: David S. Miller > Cc: linux-a...@vger.kernel.org > Signed-off-by: Oskar Andero > --- > kernel/kprobes.c | 88 > +-

[PATCH 00/11] tracing: bugfix and kprobe-based dynamic event updates

2013-05-08 Thread Masami Hiramatsu
this series. --- Masami Hiramatsu (11): [BUGFIX] tracing: Return 0 if event_enable_func succeeded [BUGFIX] ftrace, kprobes: Fix a deadlock on ftrace_regex_lock ftrace: Cleanup regex_lock and ftrace_lock around hash updating [BUGFIX] tracing/kprobes: Fix to increment return

[PATCH 01/11] [BUGFIX] tracing: Return 0 if event_enable_func succeeded

2013-05-08 Thread Masami Hiramatsu
turns 1 to ftrace_regex_write, it consumes 1 byte and pass input string without the first character again. This makes event_enable_func fail and disables event entry. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi --- kernel/

[PATCH 06/11] [BUGFIX] tracing: Modify soft-mode only if no other referrer

2013-05-08 Thread Masami Hiramatsu
filter all functions enabled vfs_symlink:enable_event:net:netif_rx:unlimited As above, we still have a trigger, but soft-mode is gone. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: David Sharp Cc: Hiraku Toyooka Cc: Tom Zanussi --- i

[PATCH 07/11] [TRIVIAL] tracing/kprobes: Use bool for retprobe checker

2013-05-08 Thread Masami Hiramatsu
Use bool instead of int for kretprobe checker. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi --- kernel/trace/trace_kprobe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_kprobe.c b

[PATCH 08/11] tracing/kprobes: Increment probe hit-count even if it is used by perf

2013-05-08 Thread Masami Hiramatsu
Increment probe hit-count for profiling even if it is used by perf tool. Same thing has already done in trace_uprobe. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Srikar Dronamraju --- kernel/trace

[PATCH 09/11] tracing/kprobes: Pass trace_probe directly from dispatcher

2013-05-08 Thread Masami Hiramatsu
Pass the pointer of struct trace_probe directly from probe dispatcher to handlers. This removes redundant container_of macro uses. Same thing has already done in trace_uprobe. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi Cc: Oleg

[PATCH 10/11] tracing/kprobes: Support ftrace_event_file base multibuffer

2013-05-08 Thread Masami Hiramatsu
Support multi-buffer on kprobe-based dynamic events by using ftrace_event_file. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Srikar Dronamraju --- kernel/trace/trace_kprobe.c | 250

[PATCH 11/11] tracing/kprobes: Support soft-mode disabling

2013-05-08 Thread Masami Hiramatsu
Support soft-mode disabling on kprobe-based dynamic events. Soft-disabling is just ignoring recording if the soft disabled flag is set. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Srikar Dronamraju

[PATCH 03/11] ftrace: Cleanup regex_lock and ftrace_lock around hash updating

2013-05-08 Thread Masami Hiramatsu
. 2. update the local hash. 3. move(actually, copy) back the local hash to ftrace_ops. 4. update ftrace entries if needed. 5. release the local hash. This makes regex_lock to protect #1-#4, and ftrace_lock to protect #3 and #4. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbec

[PATCH 05/11] tracing: Indicate enabled soft-mode in enable file

2013-05-08 Thread Masami Hiramatsu
Indicate enabled soft-mode event as "1*" in "enable" file for each event, because it can be soft-disabled when disable_event trigger is hit. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi --- kernel/trace/t

[PATCH 04/11] [BUGFIX] tracing/kprobes: Fix to increment return event probe hit-count

2013-05-08 Thread Masami Hiramatsu
Fix to increment probe hit-count for function return event. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Tom Zanussi Cc: Oleg Nesterov Cc: Srikar Dronamraju --- kernel/trace/trace_kprobe.c |2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 02/11] [BUGFIX] ftrace, kprobes: Fix a deadlock on ftrace_regex_lock

2013-05-08 Thread Masami Hiramatsu
ce_ops. ftrace_regex_lock seems that a big lock which protect all filter/notrace_hash operation, but it doesn't need to be a global lock after supporting multiple ftrace_ops because each ftrace_ops has its own filter/notrace_hash. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecke

Re: [PATCH 02/11] [BUGFIX] ftrace, kprobes: Fix a deadlock on ftrace_regex_lock

2013-05-09 Thread Masami Hiramatsu
function tracers call its stub), so it does not > need to be initialized. If anything tries to grab its mutex, that's a > bug anyway. > > What do you think? Hmm, would we really need to have the additional flag? I mean, do we better force ftrace user to use ftrace_ops_init before

Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()

2013-04-11 Thread Masami Hiramatsu
g Nesterov Acked-by: Masami Hiramatsu Thank you! > --- > kernel/trace/trace_uprobe.c |8 +++- > 1 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 2d08bea..37ccb72 100644 > --- a/kernel

Re: [PATCH 0/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()

2013-04-11 Thread Masami Hiramatsu
(2013/04/10 23:58), Oleg Nesterov wrote: > On 04/08, Masami Hiramatsu wrote: >> >> (2013/04/06 0:01), Oleg Nesterov wrote: >>> >>> Masami, perhaps you can also answer the question I asked in 0/4 >>> marc.info/?l=linux-kernel&m=136458107

Re: [PATCH 2/5] perf: Reorder parameters of strglobmatch

2013-05-16 Thread Masami Hiramatsu
(2013/05/16 23:55), Steven Rostedt wrote: > On Thu, 2013-05-16 at 20:48 +0900, Masami Hiramatsu wrote: >> Reorder parameters of strglobmatch() so that the first >> parameter is the glob pattern as like as regexec(), >> because the subjective parameter of strglobmatch() must &

Re: Re: [PATCH 2/5] perf: Reorder parameters of strglobmatch

2013-05-21 Thread Masami Hiramatsu
(2013/05/21 18:19), Arnaldo Carvalho de Melo wrote: > Em Fri, May 17, 2013 at 11:21:11AM +0900, Masami Hiramatsu escreveu: >> (2013/05/16 23:55), Steven Rostedt wrote: >>> I'm a bit confused to the rational here. Can you explain in more detail >>> to why this patc

[PATCH v2 0/5] Add glob pattern matching support on trigger and kprobe-event

2013-05-21 Thread Masami Hiramatsu
ng. I don't care about the speed of matching because the all of the matching which I've introduced in this series are done on slow-path. Changes in v2: - Update the comment of patch [2/5] for explaining more detail of the backgroud. --- Masami Hiramatsu (5): [BUGFIX] tracing:

[PATCH v2 4/5] tracing/kprobes: Allow user to delete kprobe events by wild cards

2013-05-21 Thread Masami Hiramatsu
es/p_vfs_symlink_0 vfs_symlink p:kprobes/p_vfs_symlink_5 vfs_symlink+5 p:kprobes/p_vfs_read_0 vfs_read # echo -:kprobes/\*vfs_symlink_\* >> kprobe_events # cat kprobe_events p:kprobes/p_vfs_read_0 vfs_read Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Mo

[PATCH v2 1/5] [BUGFIX] tracing: Returns -EBUSY when event_enable_func fails to get module

2013-05-21 Thread Masami Hiramatsu
y it fails is under removing module at that time. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar --- kernel/trace/trace_events.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trac

[PATCH v2 3/5] lib/string: Add a generic wildcard string matching function

2013-05-21 Thread Masami Hiramatsu
Add strglobmatch() for generic wildcard string matching. This code is originally from perf-tools. For porting in the kernel, the limitation of the number of wildcards is introduced, because of the limitation of the stack. Signed-off-by: Masami Hiramatsu Cc: Andrew Morton Cc: Akinobu Mita Cc

[PATCH v2 5/5] tracing: Support enable/disable multiple events trigger by wild cards

2013-05-21 Thread Masami Hiramatsu
ble:0* events/block/block_sleeprq/enable:0* events/irq/irq_handler_entry/enable:0* events/irq/irq_handler_exit/enable:0* events/irq/softirq_entry/enable:0* events/irq/softirq_exit/enable:0* events/irq/softirq_raise/enable:0* Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Frederic Weisbec

[PATCH v2 2/5] perf: Swap the parameters of strglobmatch

2013-05-21 Thread Masami Hiramatsu
v2: - Update the comment of patch [2/5] for explaining more detail of the backgroud. Signed-off-by: Masami Hiramatsu Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Irina Tirdea Cc: Pekka Enberg Cc: Borislav Petkov

[PATCH 1/2] [BUGFIX] kprobes: Fix to free gone and unused optprobes

2013-05-22 Thread Masami Hiramatsu
e to check the double free. Fortunately, most of arch codes already checked that except for mips. This will be fixed in the next patch. Signed-off-by: Masami Hiramatsu Cc: Frank Ch. Eigler Cc: Timo Juhani Lindfors Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: "David S. Miller&

[PATCH 2/2] [BUGFIX] kprobes/mips: Fix to check double free of insn slot

2013-05-22 Thread Masami Hiramatsu
Fix to check double free of insn_slot at arch_remove_kprobe as other arches do. Signed-off-by: Masami Hiramatsu Cc: Ralf Baechle Cc: David Daney Cc: Maneesh Soni Cc: Victor Kamensky Cc: linux-m...@linux-mips.org --- arch/mips/kernel/kprobes.c |5 - 1 file changed, 4 insertions(+), 1

Re: [PATCH] Kprobes blacklist: Conditionally add x86-specific symbols

2013-03-07 Thread Masami Hiramatsu
irq_entries_start",}, > {"common_interrupt",}, > +#endif > {"mcount",},/* mcount can be called from everywhere */ > {NULL}/* Terminator */ > }; > -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitach

Re: [PATCH] delay blacklist symbol lookup until we actually need it

2013-03-07 Thread Masami Hiramatsu
kretprobe_blacklist[i].name != NULL; i++) { > - kprobe_lookup_name(kretprobe_blacklist[i].name, > -kretprobe_blacklist[i].addr); > - if (!kretprobe_blacklist[i].addr) > - printk(&quo

Re: Re: [PATCH] Kprobes blacklist: Conditionally add x86-specific symbols

2013-03-08 Thread Masami Hiramatsu
(2013/03/08 22:15), oskar.and...@sonymobile.com wrote: > On 05:23 Fri 08 Mar , Masami Hiramatsu wrote: >> (2013/03/07 19:44), oskar.and...@sonymobile.com wrote: >>> From: Bjorn Davidsson >>> >>> The kprobes blacklist contains x86-specific symbols. >

[PATCH -tip ] [BUGFIX] kprobes: Move hash_64() into .text.kprobe section

2013-03-11 Thread Masami Hiramatsu
nstprop.24 81391066 t hash_64.constprop.40 8139107c t hash_64.constprop.15 81391092 T __kprobes_text_end Signed-off-by: Masami Hiramatsu Reported-by: Timo Juhani Lindfors Cc: "David S. Miller" Cc: Nadia Yvette Chambers Cc: Pavel Emelyanov Cc: Jiri Kosina Cc: Ananth

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 >> >> Count debugfs/tracing/per_cpu/cpu* to determine the >> number of CPUs. > > I'm curious, do you find that sysconf doesn&#

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 >>> >>> Count debugfs/tracing/per_cpu/cpu* to determine the >>> number

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

Re: [Memory Leak] free kprobe before optimized_kprobe free

2012-08-23 Thread Masami Hiramatsu
ng, fallback to kprobe */ > arch_remove_optimized_kprobe(op); > + kfree(ap); > kfree(op); > return; > } > -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Resear

Re: [PATCH 1/4] perf tools: remove sscanf extension %as

2012-09-18 Thread Masami Hiramatsu
n't but I think it's > needed. right, it should be fixed. >> +fmt2_str = strtok_r(NULL, "", &fmt); >> +if (fmt2_str == NULL) >> tp->offset = 0; >> +else >> +tp->offset = strtoul(fmt2_str, NULL,

Re: [PATCH] x86, kprobes: Hide skip_singlestep forward declaration properly

2012-09-20 Thread Masami Hiramatsu
e KPROBES_CAN_USE_FTRACE as it > is done in its callsites. Thank you for reporting and fixing :) Acked-by: Masami Hiramatsu Ingo, please pull this. Thank you, > > Cc: Masami Hiramatsu > Cc: Steven Rostedt > Signed-off-by: Borislav Petkov > --- > arch/x86/kerne

Re: [PATCH] x86, kprobes: Hide skip_singlestep forward declaration properly

2012-09-20 Thread Masami Hiramatsu
(2012/09/20 18:25), Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > >> (2012/09/19 22:46), Borislav Petkov wrote: >>> From: Borislav Petkov >>> >>> I get >>> >>> arch/x86/kernel/kprobes.c:544:23: warning: ‘skip_singlestep’

Re: [PATCH] perf probe: Allow of casting an array of char to string

2012-09-20 Thread Masami Hiramatsu
missed the array case. This must be fixed. Acked-by: Masami Hiramatsu Thank you! > > Cc: Masami Hiramatsu > Cc: Srikar Dronamraju > Signed-off-by: Hyeoncheol Lee > --- > tools/perf/util/probe-finder.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) &

Re: [RFC PATCH 3/4] ftrace: Do not test frame pointers if -mfentry is used

2012-08-07 Thread Masami Hiramatsu
t; } > > -#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST > +#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY) I think CONFIG_HAVE_FENTRY would better unselect CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST in arch/x86/Kconfig explicitly. Thank you, -- Mas

Re: [RFC PATCH 3/4] ftrace: Do not test frame pointers if -mfentry is used

2012-08-08 Thread Masami Hiramatsu
(2012/08/08 21:49), Steven Rostedt wrote: > On Wed, 2012-08-08 at 13:34 +0900, Masami Hiramatsu wrote: >> >>> -#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST >>> +#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && >>> !defined(CC_USING_FENTRY) >> &

Re: [RFC PATCH 4/4] ftrace/x86: Add support for -mfentry to x86_64

2012-08-09 Thread Masami Hiramatsu
t; frame is set up, and allows the function callbacks to be able to access > parameters. As kprobes now can use function tracing (at least on x86) > this speeds up the kprobe hooks that are at the beginning of the > function. This looks good for me:) Reviewed-by: Masami Hira

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 >> >> Enable to use splice_write from pipe to virtio-console port. >> This steals pages from pipe and directly send it to host. >> >>

Re: [RFC PATCH 2/6] virtio/console: Add a failback for unstealable pipe buffer

2012-08-09 Thread Masami Hiramatsu
(2012/08/09 18:03), Amit Shah wrote: > On (Tue) 24 Jul 2012 [11:37:18], Yoshihiro YUNOMAE wrote: >> From: Masami Hiramatsu >> >> Add a failback memcpy path for unstealable pipe buffer. >> If buf->ops->steal() fails, virtio-serial tries to >> copy the page

Re: Re: [RFC PATCH 4/4] ftrace/x86: Add support for -mfentry to x86_64

2012-08-10 Thread Masami Hiramatsu
uses mcount. Ah, right. we have to take care about it. > > I fixed this in the patch below. But as you two have acked and reviewed > it, I can't add your tags if I have changed the code. Can you ack/review > it again. This looks good for me. Reviewed-by: Masami Hiramatsu &

[RFC][PATCH] kprobes: kprobe-booster for ia64

2008-02-05 Thread Masami Hiramatsu
From: Masami Hiramatsu <[EMAIL PROTECTED]> Add kprobe-booster support on ia64. On ia64, bundles which have B or X unit and which may cause an exception (including break) are not boosted. And also, if several kprobes share a bundle but are placed in different slots, only the hindmost kpr

Re: [RFC][PATCH] kprobes: kprobe-booster for ia64

2008-02-06 Thread Masami Hiramatsu
's instruction buffer (kprobe.ainsn.insn->bundle[1]) when preparing the kprobe. So, other cpu never execute it, and we don't need to write it atomically. > On cpu models that support st16 you could construct the brl instruction > and use a single st16 to update the whole bundl

Re: [PATCH 2/2] kprobe: remove preempt_enable/disable from kprobe_handle_fault()

2008-02-07 Thread Masami Hiramatsu
ptible, so test explicitly > for preemption and bail out before hitting kprobe_running(). > > Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Acked-by: Masami Hiramatsu <[EMAIL PROTECTED]> -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc.

Re: [PATCH 1/2] kprobes: Introduce kprobe_handle_fault()

2008-02-07 Thread Masami Hiramatsu
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Tested on i386/x86-64. Acked-by: Masami Hiramatsu <[EMAIL PROTECTED]> -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America) Inc. Software Solutions Division e-mail: [EMAIL PROTECTED] -- To unsubscribe from this li

Re: [PATCH 07/19] ftrace/x86_32: Simplify parameter setup for ftrace_regs_caller

2012-07-22 Thread Masami Hiramatsu
nd pushing the reg, simply push the stack pointer. > > Link: http://lkml.kernel.org/r/1342702344.12353.16.ca...@gandalf.stny.rr.com > Looks simple and readable :) Reviewed-by: Masami Hiramatsu Thanks! > Signed-off-by: Uros Bizjak > Signed-off-by: Steven Rostedt > ---

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

2012-07-23 Thread Masami Hiramatsu
ransfer. Actually, one copy should occur in the host (to write it into the pipe), because 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

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

2012-07-24 Thread Masami Hiramatsu
led via the special file on exported debugfs.) Of course, this also requires modifying trace-cmd/perf to accept some 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

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

2012-07-25 Thread Masami Hiramatsu
the other hand, with this feature, QEMU just passes trace-data to host-side pipe. Since outer tracing tool separately collects trace data, we don't need to demultiplex the data. Perhaps, in the analyzing phase (after tracing), we have to mix events again. At that time, we'll add som

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

2012-08-21 Thread Masami Hiramatsu
/autotest/autotest/blob/e91cd67b845b291622c8d079a8289c4b0cb1e6ae/client/tests/kvm/tests/virtio_console.py > > Thank you again, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To uns

Re: [PATCH 5/6] ftrace/x86: Add separate function to save regs

2012-07-11 Thread Masami Hiramatsu
(2012/07/12 1:28), Steven Rostedt wrote: > On Wed, 2012-07-11 at 12:22 -0400, Steven Rostedt wrote: >> On Tue, 2012-07-03 at 17:29 +0900, Masami Hiramatsu wrote: >> >> >>> >>>> + /* Restore flags */ >>>> + pushq EFLAGS(%rsp) >>>

Re: [RFC][PATCH 1/4 v4] ftrace/x86: Add separate function to save regs

2012-07-12 Thread Masami Hiramatsu
k if ARCH_SUPPORTS_FTRACE_SAVE_REGS. > If the arch supports passing regs it will set this macro and pass regs > for ops that request them. All other archs will just pass NULL. OK, this is good for me:) Reviewed-by: Masami Hiramatsu Thank you! > > Cc: Alexander van Heukelum >

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