Re: FInal kprobes rollup patches

2007-12-17 Thread Srikar Dronamraju
* Ingo Molnar [EMAIL PROTECTED] [2007-12-15 14:12:04]: Hi Ingo, Harvey In file include/asm-x86/kprobes_32.h typedef u8 kprobe_opcode_t; hence sizeof(kprobe_opcode_t) turns out to be 1. Hence memcpy(p-ainsn.insn, p-addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); is correct. -- Regards Srikar

Re: FInal kprobes rollup patches

2007-12-17 Thread Srikar Dronamraju
Hi Ingo, Harvey In file include/asm-x86/kprobes_32.h typedef u8 kprobe_opcode_t; hence sizeof(kprobe_opcode_t) turns out to be 1. Hence memcpy(p-ainsn.insn, p-addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); is correct. -- Regards Srikar * Harvey Harrison [EMAIL PROTECTED] wrote: If

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-11-01 Thread Srikar Dronamraju
Subject: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume() Cleanup. No need to clear TIF_UPROBE, uprobe_notify_resume() does this. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/powerpc/kernel

Re: [PATCH 2/4] uprobes/powerpc: Do not use arch_uprobe_*_step() helpers

2012-11-01 Thread Srikar Dronamraju
Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/powerpc/kernel/uprobes.c |6 ++ kernel/events/uprobes.c |2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel

Re: [PATCH 4/4] uprobes: Kill arch_uprobe_enable/disable_step() hooks

2012-11-02 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-10-28 18:39:36]: Kill arch_uprobe_enable/disable_step() hooks, they do nothing and nobody needs them. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include/linux/uprobes.h |2 -- kernel

Re: [PATCH 3/4] uprobes/x86: Cleanup the single-stepping code

2012-11-02 Thread Srikar Dronamraju
-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/x86/kernel/uprobes.c | 54 +++- 1 files changed, 19 insertions(+), 35 deletions(-) diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel

Re: [PATCH 1/3] uprobes: Change write_opcode() to use FOLL_FORCE

2012-09-25 Thread Srikar Dronamraju
Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 14c2e99..fa1579a 100644 --- a/kernel/events/uprobes.c

Re: [PATCH 2/3] uprobes: Change valid_vma() to demand VM_MAYEXEC rather than VM_EXEC

2012-09-25 Thread Srikar Dronamraju
VM_MAYREAD, it is always set. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c

Re: [PATCH 3/3] uprobes: Restrict valid_vma(false) to skip VM_SHARED

2012-09-25 Thread Srikar Dronamraju
. Signed-off-by: Oleg Nesterov o...@redhat.com The changes look good. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index

possible recursive locking in numasched code

2012-09-25 Thread Srikar Dronamraju
to task_tick_numa to outside the rq-lock. Not a clean approach as in we end up calling a sched/fair.c defined function in sched/core.c explicitly. The below patch tries to implement 4th approach. --- From: Srikar Dronamraju sri...@linux.vnet.ibm.com Date: Tue, 25 Sep 2012 02:37:55 -0700 Subject

Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?

2012-09-25 Thread Srikar Dronamraju
Hi Hyeoncheol, uprobe_event only supports %REG arguments. I think that memory fetch, return value fetch, memory dereference functions in kernel/trace/trace_probe.c are good for uprobe_event. Yes, these will be good to have and is listed as todo. So with a little modification of

Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?

2012-09-25 Thread Srikar Dronamraju
to the hot data. We could look at supporting data that is paged out later. BTW, if we can support offs(FETCHARGS), $stack and $stackN are also available. ;) -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [PATCH 1/4] uprobes: Kill set_swbp()-is_swbp_at_addr()

2012-10-06 Thread Srikar Dronamraju
. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http://vger.kernel.org/majordomo-info.html Please

Re: [PATCH 2/4] uprobes: Introduce copy_opcode(), kill read_opcode()

2012-10-06 Thread Srikar Dronamraju
it into its single caller, is_swbp_at_addr(). 3. Remove auprobe argument from write_opcode(), it is not used since f403072c6. Signed-off-by: Oleg Nesterov o...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 4/4] uprobes: Simplify is_swbp_at_addr(), remove stale comments

2012-10-06 Thread Srikar Dronamraju
-by: Oleg Nesterov o...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH 3/4] uprobes: Kill set_orig_insn()-is_swbp_at_addr()

2012-10-06 Thread Srikar Dronamraju
. Signed-off-by: Oleg Nesterov o...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/7] uprobes/x86: Only rep+nop can be emulated correctly

2012-10-06 Thread Srikar Dronamraju
these additional checks. If we want to implement this correctly we need to know the full insn length to update -ip. rep* + nop is fine even without updating -ip. Signed-off-by: Oleg Nesterov o...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com -- To unsubscribe from this list: send

Re: [PATCH 2/7] uprobes: Don't return success if alloc_uprobe() fails

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-09-30 21:42:01]: If alloc_uprobe() fails uprobe_register() should return ENOMEM, not 0. Signed-off-by: Oleg Nesterov o...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 3/7] uprobes: Do not delete uprobe if uprobe_unregister() fails

2012-10-06 Thread Srikar Dronamraju
. Change register_for_each_vma(is_register = false) to remove as much breakpoints as possible but return non-zero if remove_breakpoint() fails at least once. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com -- To unsubscribe from this list

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-09-30 21:42:11]: Strictly speaking this race was added by me in 56bb4cf6. However I think that this bug is just another indication that we should move copy_insn/uprobe_analyze_insn code from install_breakpoint() to uprobe_register(), there are a lot of

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-06 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-09-30 21:42:17]: Preparation. Extract the copy_insn/arch_uprobe_analyze_insn code from install_breakpoint() into the new helper, uprobe_copy_insn(). And move uprobe-flags defines from uprobes.h to uprobes.c, nobody else can use them anyway.

Re: [PATCH 6/7] uprobes: Fix uprobe_copy_insn() race with itself

2012-10-06 Thread Srikar Dronamraju
mutex instead of a per-uprobe mutex. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH 7/7] uprobes: Fix the racy uprobe-flags manipulation

2012-10-06 Thread Srikar Dronamraju
UPROBE_SKIP_SSTEP. Change this code to use bitops. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-06 Thread Srikar Dronamraju
it as is for now. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.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 info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-06 Thread Srikar Dronamraju
. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com == [PATCH 5/7] uprobes: Introduce uprobe_copy_insn() Preparation. Extract the copy_insn/arch_uprobe_analyze_insn code from install_breakpoint() into the new

Re: [PATCH 4/7] uprobes: Fix handle_swbp() vs unregister() + register() race

2012-10-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-10-06 20:53:37]: On 10/06, Srikar Dronamraju wrote: for the future changes... (say, we can remove bp if consumers do not want to trace this task). Not sure it makes sense to change it right now. So. Should I leave this patch as is? Or do

Re: [PATCH 5/7] uprobes: Introduce uprobe_copy_insn()

2012-10-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-10-06 20:59:49]: On 10/06, Srikar Dronamraju wrote: Yeah prepare_uprobe() looks good for me. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com OK, renamed. The next patches updated accordinly, I hope I can keep your acks. Yes, please keep

Re: [PATCH 00/31] numa/core patches

2012-11-05 Thread Srikar Dronamraju
Hey Peter, Here are results on 2node and 8node machine while running the autonuma benchmark. On 2 node, 12 core 24GB KernelVersion:

Re: uprobes pre-filtering

2012-11-06 Thread Srikar Dronamraju
Hello. There is a known (and by design) problem with uprobes. They act systemwide, there is no pre-filtering. Just some random thoughts to provoke the discussion. - I think that the current uprobe_consumer-filter(task) should die. It buys nothing. It is called right before -handler()

Re: [PATCH 00/33] AutoNUMA27

2012-10-23 Thread Srikar Dronamraju
* Andrea Arcangeli aarca...@redhat.com [2012-10-14 06:57:16]: I'll release an autonuma29 behaving like 28fast if there are no surprises. The new algorithm change in 28fast will also save memory once I rewrite it properly. Here are my results of specjbb2005 on a 2 node box (Still on

Re: [PATCH] uprobe: fix misleading log entry

2012-10-11 Thread Srikar Dronamraju
On Wed, Jul 18, 2012 at 5:22 PM, Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: * Jovi Zhang bookj...@gmail.com [2012-07-18 11:08:42]: From 68232ef2decae95b807f2f3763e8ea99c1a3b2ae Mon Sep 17 00:00:00 2001 From: Jovi Zhang bookj...@gmail.com Date: Wed, 18 Jul 2012 17:51:26 +0800

Re: [PATCH 00/33] AutoNUMA27

2012-10-13 Thread Srikar Dronamraju
* Andrea Arcangeli aarca...@redhat.com [2012-10-04 01:50:42]: Hello everyone, This is a new AutoNUMA27 release for Linux v3.6. Here results of autonumabenchmark on a 328GB 64 core with ht disabled comparing v3.6 with autonuma27. $ numactl -H available: 8 nodes (0-7) node 0 cpus: 0 1 2 3

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-10-29 Thread Srikar Dronamraju
* Ananth N Mavinakayanahalli ana...@in.ibm.com [2012-10-29 10:57:07]: On Sun, Oct 28, 2012 at 06:39:25PM +0100, Oleg Nesterov wrote: Hi Oleg, Cleanup. No need to clear TIF_UPROBE, do_notify_resume() does this. Signed-off-by: Oleg Nesterov o...@redhat.com ---

Re: [PATCH 00/33] AutoNUMA27

2012-10-15 Thread Srikar Dronamraju
Interesting. So numa01 should be improved in autonuma28fast. Not sure why the hard binds show any difference, but I'm more concerned in optimizing numa01. I get the same results from hard bindings on upstream or autonuma, strange. Could you repeat only numa01 with the

Re: [PATCH 19/33] autonuma: memory follows CPU algorithm and task/mm_autonuma stats collection

2012-10-15 Thread Srikar Dronamraju
* Srikar Dronamraju sri...@linux.vnet.ibm.com [2012-10-13 23:36:18]: + +bool numa_hinting_fault(struct page *page, int numpages) +{ + bool migrated = false; + + /* +* current-mm could be different from the mm where the +* NUMA hinting page fault happened

Re: [PATCH 19/33] autonuma: memory follows CPU algorithm and task/mm_autonuma stats collection

2012-10-15 Thread Srikar Dronamraju
* Mel Gorman m...@csn.ul.ie [2012-10-15 10:20:44]: On Mon, Oct 15, 2012 at 01:54:13PM +0530, Srikar Dronamraju wrote: * Srikar Dronamraju sri...@linux.vnet.ibm.com [2012-10-13 23:36:18]: + +bool numa_hinting_fault(struct page *page, int numpages) +{ + bool migrated

Re: [PATCH 1/9] uprobes: move function declarations out of arch

2012-10-15 Thread Srikar Dronamraju
* Rabin Vincent ra...@rab.in [2012-10-14 21:23:05]: It seems odd to keep the function declarations in the arch header where they will need to be copy/pasted verbatim across arches. Move them to the common header. Signed-off-by: Rabin Vincent ra...@rab.in ---

Re: [PATCH] perf probe: convert_name_to_addr() allocated the wrong size buffer for a function name

2012-10-15 Thread Srikar Dronamraju
: Masami Hiramatsu masami.hiramatsu...@hitachi.com Cc: Srikar Dronamraju sri...@linux.vnet.ibm.com Signed-off-by: Hyeoncheol Lee hyc@gmail.com --- tools/perf/util/probe-event.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe

Re: [PATCH 2/9] uprobes: check for single step support

2012-10-17 Thread Srikar Dronamraju
* Rabin Vincent ra...@rab.in [2012-10-14 21:23:06]: Check for single step support before calling user_enable_single_step(), since user_enable_single_step() just BUG()s if support does not exist. Needed by ARM. Signed-off-by: Rabin Vincent ra...@rab.in --- kernel/events/uprobes.c |3

Re: [PATCH 3/9] uprobes: allow ignoring of probe hits

2012-10-17 Thread Srikar Dronamraju
static struct uprobe *find_active_uprobe(unsigned long bp_vaddr, int *is_swbp) { struct mm_struct *mm = current-mm; @@ -1469,6 +1474,7 @@ static void handle_swbp(struct pt_regs *regs) struct uprobe *uprobe; unsigned long bp_vaddr; int uninitialized_var(is_swbp);

Re: [PATCH 4/9] uprobes: allow arch access to xol slot

2012-10-17 Thread Srikar Dronamraju
* Rabin Vincent ra...@rab.in [2012-10-14 21:23:08]: Allow arches to customize how the instruction is filled into the xol slot. ARM will use this to insert an undefined instruction after the real instruction in order to simulate a single step of the instruction without hardware support.

Re: [PATCH 2/2] uprobes: Use brw_mutex to fix register/unregister vs dup_mmap() race

2012-10-18 Thread Srikar Dronamraju
adds brw_start/end_read() around dup_mmap(), and brw_start/end_write() into register_for_each_vma(). This adds 2 new hooks into dup_mmap() but we can kill uprobe_dup_mmap() and fold it into uprobe_end_dup_mmap(). Reported-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Signed-off-by: Oleg

Re: [PATCH 5/9] uprobes: allow arch-specific initialization

2012-10-18 Thread Srikar Dronamraju
* Rabin Vincent ra...@rab.in [2012-10-14 21:23:09]: Add a weak function for any architecture-specific initialization. ARM will use this to register the handlers for the undefined instructions it uses to implement uprobes. Signed-off-by: Rabin Vincent ra...@rab.in ---

Re: [PATCH 5/5] uprobes: kill insert_vm_struct()-uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-07-08 22:30:11]: Kill insert_vm_struct()-uprobe_mmap(). It is not needed, nobody except arch/ia64/kernel/perfmon.c uses insert_vm_struct(vma) with vma-vm_file != NULL. Right, but somebody else might start using this later. I cant think of a use case

Re: [PATCH 4/5] uprobes: kill copy_vma()-uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
uprobe_mmap() in move_vma() but we can not do this right now, this can confuse uprobes_state.counter (which I still hope we are going to kill). Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- mm/mmap.c |3 --- 1 files changed, 0

Re: [PATCH RFC V3 2/3] kvm: Note down when cpu relax intercepted or pause loop exited

2012-07-13 Thread Srikar Dronamraju
On 12/07/12 21:18, Raghavendra K T wrote: +#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT [...] + struct { + bool cpu_relax_intercepted; + bool dy_eligible; + } ple; +#endif [...] } vcpu-run = page_address(page); + vcpu-ple.cpu_relax_intercepted =

Re: [PATCH 5/5] uprobes: kill insert_vm_struct()-uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
is visible to find_vma(). And even if this worked, we must not insert the new bp before this mapping is visible to vma_prio_tree_foreach() for uprobe_unregister(). Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- mm/mmap.c |3

Re: [PATCH 5/5] uprobes: kill insert_vm_struct()-uprobe_mmap()

2012-07-13 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2012-07-13 15:29:16]: On 07/13, Srikar Dronamraju wrote: * Oleg Nesterov o...@redhat.com [2012-07-08 22:30:11]: Kill insert_vm_struct()-uprobe_mmap(). It is not needed, nobody except arch/ia64/kernel/perfmon.c uses insert_vm_struct(vma) with vma

Re: uprobes: fix uprobe tracer wrong documentation

2012-07-16 Thread Srikar Dronamraju
the optional event name. Signed-off-by: Jovi Zhang bookj...@gmail.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- Documentation/trace/uprobetracer.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/trace/uprobetracer.txt b/Documentation

Re: uprobe: checking probe event include directory

2012-07-17 Thread Srikar Dronamraju
* Frederic Weisbecker fweis...@gmail.com [2012-07-17 12:59:39]: On Tue, Jul 17, 2012 at 06:12:28PM +0800, Jovi Zhang wrote: From 16ed13ee9098ae01705e8456005d1ad6d9909128 Mon Sep 17 00:00:00 2001 From: Jovi Zhang bookj...@gmail.com Date: Wed, 18 Jul 2012 01:16:23 +0800 Subject: [PATCH]

Re: [PATCH] uprobe: fix misleading log entry

2012-07-18 Thread Srikar Dronamraju
); + pr_info(Probe definition must be started with 'p' or '-'.\n); return -EINVAL; } Yes, uprobes doesnt support return probes. So we should not have mentioned about r. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com -- To unsubscribe from this list

Re: uprobe: checking probe event include directory

2012-07-18 Thread Srikar Dronamraju
* Jovi Zhang bookj...@gmail.com [2012-07-18 19:38:27]: On Wed, Jul 18, 2012 at 7:07 PM, Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: The patch looks good, Can you modify the description a bit. However you are free to ignore these comments. After knowing your response, I will ack

Re: [PATCH 1/4] uprobes/tracing: Kill the pointless task_pt_regs() calls

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-29 19:15:40]: uprobe_trace_func() and uprobe_perf_func() do not need task_pt_regs(), we already have struct pt_regs *regs. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Adding Masami in the cc

Re: [PATCH 2/4] uprobes/tracing: Kill the pointless seq_print_ip_sym() call

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-29 19:15:43]: seq_print_ip_sym(ip) in print_uprobe_event() is pointless, kallsyms_lookup(ip) can not resolve a user-space address. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace

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

2013-04-04 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-29 19:15:45]: uprobe_trace_func() is never called with irqs or preemption disabled, no need to ask preempt_count() or local_save_flags(). Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Adding

Re: [PATCH 4/4] uprobes/tracing: generalize struct uprobe_trace_entry_head

2013-04-04 Thread Srikar Dronamraju
...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Also copying Masami. --- kernel/trace/trace.h|5 --- kernel/trace/trace_uprobe.c | 61 -- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/kernel/trace/trace.h b

Re: [PATCH 3/6] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-01 18:08:51]: Change uprobe_trace_print() and uprobe_perf_print() to check is_ret_probe() and fill ring_buffer_event accordingly. Also change uprobe_trace_func() and uprobe_perf_func() to not _print() if is_ret_probe() is true. Note that we keep

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov an...@redhat.com [2013-04-03 18:00:36]: Uretprobe handlers are invoked when the trampoline is hit, on completion the trampoline is replaced with the saved return address and the uretprobe instance deleted. v1 changes: * pass bp_vaddr to ret_handler() * simplify

Re: [PATCH v1 1/9] uretprobes: Introduce uprobe_consumer-ret_handler()

2013-04-07 Thread Srikar Dronamraju
. * introduce -ret_handler(). Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include/linux/uprobes.h | 3 +++ kernel/events/uprobes.c | 17 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include

Re: [PATCH v1 2/9] uretprobes: Reserve the first slot in xol_vma for trampoline

2013-04-07 Thread Srikar Dronamraju
confusion and eases the debug experience in case -vaddr notion will be changed. v1 changes: * rework get_trampoline_vaddr() helper. * init xol_area-slot_count. Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com (one small check below

Re: [PATCH v1 3/9] uretprobes/x86: Hijack return address

2013-04-07 Thread Srikar Dronamraju
RFCv2 changes: * remove -doomed flag, kill task immediately Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/x86/include/asm/uprobes.h | 1 + arch/x86/kernel/uprobes.c | 29 + 2 files changed, 30

Re: [PATCH v1 4/9] uretprobes/ppc: Hijack return address

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov an...@redhat.com [2013-04-03 18:00:34]: Hijack the return address and replace it with a trampoline address. PowerPC implementation. Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/powerpc/include/asm/uprobes.h

Re: [PATCH v1 5/9] uretprobes: Return probe entry, prepare_uretprobe()

2013-04-07 Thread Srikar Dronamraju
() in consumer. Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include/linux/uprobes.h | 1 + kernel/events/uprobes.c | 92 - 2 files changed, 92 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v1 7/9] uretprobes: Limit the depth of return probe nestedness

2013-04-07 Thread Srikar Dronamraju
limitation. It is not easy task and lays beyond this patchset. Signed-off-by: Anton Arapov an...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include/linux/uprobes.h | 3 +++ kernel/events/uprobes.c | 11 +++ 2 files changed, 14 insertions(+) diff --git

Re: [PATCH v1 8/9] uretprobes: Remove -ENOSYS as return probes implemented

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov an...@redhat.com [2013-04-03 18:00:38]: Enclose return probes implementation. Signed-off-by: Anton Arapov an...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com kernel/events/uprobes.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel

Re: [PATCH v1 9/9] uretprobes: Documentation update

2013-04-07 Thread Srikar Dronamraju
* Anton Arapov an...@redhat.com [2013-04-03 18:00:39]: add the uretprobe syntax and update an example Signed-off-by: Anton Arapov an...@redhat.com --- Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Documentation/trace/uprobetracer.txt | 114

Re: [PATCH 1/6] uprobes/tracing: Introduce uprobe_{trace,perf}_print() helpers

2013-04-07 Thread Srikar Dronamraju
-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 29 - 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index

Re: [PATCH 2/6] uprobes/tracing: Introduce is_ret_probe() and uretprobe_dispatcher()

2013-04-07 Thread Srikar Dronamraju
and is_ret_probe(tu) is false too. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 42 -- 1 files changed, 40 insertions(+), 2 deletions(-) diff --git a/kernel/trace

Re: [PATCH 4/6] uprobes/tracing: Make register_uprobe_event() paths uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-01 18:08:54]: Change uprobe_event_define_fields(), and __set_print_fmt() to check is_ret_probe() and use the appropriate format/fields. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel

Re: [PATCH 5/6] uprobes/tracing: Make seq_printf() code uretprobe-friendly

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-01 18:08:57]: Change probes_seq_show() and print_uprobe_event() to check is_ret_probe() and print the correct data. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c

Re: [PATCH 6/6] uprobes/tracing: Change create_trace_uprobe() to support uretprobes

2013-04-07 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-01 18:09:00]: Finally change create_trace_uprobe() to check if argv[0][0] == 'r' and pass the correct is_ret to alloc_trace_uprobe(). Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel

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

2013-04-13 Thread Srikar Dronamraju
...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- 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/trace

Re: [PATCH 3/6] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-13 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-04-09 15:33:33]: On 04/07, Srikar Dronamraju wrote: * Oleg Nesterov o...@redhat.com [2013-04-01 18:08:51]: diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index e91a354..db2718a 100644 --- a/kernel/trace/trace_uprobe.c

Re: [PATCH v2 4/7] uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly

2013-04-13 Thread Srikar Dronamraju
-handler() nontrivial even for uretprobe, we need this for filtering and for other potential extensions. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Tested-by: Anton Arapov an...@redhat.com --- kernel/trace/trace_uprobe.c | 34

Re: [PATCH v1 6/9] uretprobes: Return probe exit, invoke handlers

2013-04-13 Thread Srikar Dronamraju
valid. We should teach it to handle longjmp() which can invalidate the pending return_instance's. This is nontrivial, we will try to do this in a separate series. Signed-off-by: Anton Arapov an...@redhat.com Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri

mm: trivial: Remove duplicate declaration for migrate_misplaced_page

2013-03-14 Thread Srikar Dronamraju
Just noticied that e14808b49 added a duplicate extern declaration for migrate_misplaced_page() Signed-off-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- diff --git a/include/linux/migrate.h b/include/linux/migrate.h index a405d3dc..086bd33 100644 --- a/include/linux/migrate.h +++ b

Re: [PATCH v2] uprobes: Use file_inode()

2013-03-21 Thread Srikar Dronamraju
-inode set by uprobe_register(inode), and the caller uses d_inode. Signed-off-by: Oleg Nesterov o...@redhat.com Looks good to me. Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff

Re: [PATCH 5/5] uprobes: Change write_opcode() to use copy_*page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-24 19:21:25]: Change write_opcode() to use copy_highpage() + copy_to_page() and simplify the code. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c | 12

Re: [PATCH 1/5] uprobes: Turn copy_opcode() into copy_from_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-24 19:21:10]: No functional changes. Rename copy_opcode() into copy_from_page() and add the new int len argument to make it more more generic for the new users. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri

Re: [PATCH 3/5] uprobes: Kill the unnecesary filp != NULL check in __copy_insn()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-24 19:21:18]: __copy_insn(filp) can only be called after valid_vma() returns T, vma-vm_file passed as filp can not be NULL. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events

Re: [PATCH 2/5] uprobes: Change __copy_insn() to use copy_from_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-24 19:21:15]: Change __copy_insn() to use copy_from_page() and simplify the code. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/events/uprobes.c | 13 ++--- 1 files changed

Re: [PATCH 4/5] uprobes: Introduce copy_to_page()

2013-03-26 Thread Srikar Dronamraju
* Oleg Nesterov o...@redhat.com [2013-03-24 19:21:22]: Extract the kmap_atomic/memcpy/kunmap_atomic code from xol_get_insn_slot() into the new simple helper, copy_to_page(). It will have more users soon. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri

Re: [PATCH v2 1/4] uprobes: add trap variant helper

2013-03-26 Thread Srikar Dronamraju
} if (!uprobe) - *is_swbp = is_swbp_at_addr(mm, bp_vaddr); + *is_swbp = is_trap_at_addr(mm, bp_vaddr); } else { *is_swbp = -EFAULT; } -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from

Re: [PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints

2013-03-26 Thread Srikar Dronamraju
doesn't understand that the trap was inserted by some other entity and a SIGTRAP needs to be delivered. Teach uprobes to ignore breakpoints that do not belong to it. Signed-off-by: Ananth N Mavinakayanahalli ana...@in.ibm.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch

Re: [PATCH v2 4/4] uprobes/powerpc: remove additional trap instruction check

2013-03-26 Thread Srikar Dronamraju
ana...@in.ibm.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- arch/powerpc/kernel/uprobes.c |6 -- 1 file changed, 6 deletions(-) Index: linux-3.9-rc3/arch/powerpc/kernel/uprobes.c === --- linux-3.9-rc3

Re: [PATCH v2 2/4] uprobes: refuse uprobe on trap variants

2013-03-26 Thread Srikar Dronamraju
; ret = arch_uprobe_analyze_insn(uprobe-arch, mm, vaddr); -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Can we avoid sched:sched_migrate_task event being called twice from sched_fork()

2013-03-08 Thread Srikar Dronamraju
and Regards Srikar -8-- From ac9df9bca38ce22c16f1e9b7949015c14257772c Mon Sep 17 00:00:00 2001 From: Srikar Dronamraju sri...@linux.vnet.ibm.com Date: Thu, 7 Mar 2013 23:40:50 -0800 Subject: [PATCH] sched: Avoid redundant

Re: [PATCH] Fix segfault in perf probe

2013-03-12 Thread Srikar Dronamraju
...@in.ibm.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- Index: linus/tools/perf/util/strlist.c === --- linus.orig/tools/perf/util/strlist.c +++ linus/tools/perf/util/strlist.c @@ -143,7 +143,7 @@ struct strlist

Re: [PATCH 5/6] uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe

2013-02-11 Thread Srikar Dronamraju
to have ability to distinguish consumers. Certainly not. Please see the patches I am going to send. Yeah, Looking at the next patchset made me realize this. thanks -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH 5/6] uprobes/tracing: Kill uprobe_trace_consumer, embed uprobe_consumer into trace_uprobe

2013-02-11 Thread Srikar Dronamraju
errors. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 35 ++- 1 files changed, 6 insertions(+), 29 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace

Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe-nhit

2013-02-11 Thread Srikar Dronamraju
-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 55cdc14..0a9a8de 100644

Re: [PATCH 3/7] uprobes: Introduce uprobe_apply()

2013-02-11 Thread Srikar Dronamraju
-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include/linux/uprobes.h |6 ++ kernel/events/uprobes.c | 39 +++ 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 95d0002

Re: [PATCH 2/7] perf: Introduce hw_perf_event-tp_target and -tp_list

2013-02-11 Thread Srikar Dronamraju
until free_event(). Also add the struct list_head tp_list into this union. It is not strictly necessary, but it can simplify the next changes and we can add it for free. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- include

Re: [PATCH 4/7] uprobes/perf: Teach trace_uprobe/perf code to track the active perf_event's

2013-02-11 Thread Srikar Dronamraju
avoid any locking, but lets start with the obvioulsy correct trace_uprobe_filter-rwlock which protects everything. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 55

Re: [PATCH 5/7] uprobes/perf: Teach trace_uprobe/perf code to pre-filter

2013-02-11 Thread Srikar Dronamraju
TRACE_REG_PERF_UNREGISTER: probe_event_disable(tu, TP_FLAG_PROFILE); -- 1.5.5.1 -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 6/7] uprobes/perf: Teach trace_uprobe/perf code to use UPROBE_HANDLER_REMOVE

2013-02-11 Thread Srikar Dronamraju
Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 5d5a261..1114619 100644

Re: [PATCH 7/7] uprobes/perf: Avoid uprobe_apply() whenever possible

2013-02-11 Thread Srikar Dronamraju
too often. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c | 42 -- 1 files changed, 36 insertions(+), 6 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b

Re: [PATCH 3/6] uprobes/tracing: Ensure inode != NULL in create_trace_uprobe()

2013-02-04 Thread Srikar Dronamraju
. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 7b75949..f02bbec

Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe-nhit

2013-02-04 Thread Srikar Dronamraju
) struct trace_uprobe *tu; tu = container_of(con, struct trace_uprobe, consumer); + tu-nhit++; if (tu-flags TP_FLAG_TRACE) uprobe_trace_func(tu, regs); -- 1.5.5.1 -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line

Re: [PATCH 4/6] uprobes/tracing: Introduce is_trace_uprobe_enabled()

2013-02-04 Thread Srikar Dronamraju
Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_probe.h |1 - kernel/trace/trace_uprobe.c |9 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h index 9337086..5c7e09d 100644

  1   2   3   4   5   6   7   8   9   10   >