[PATCH] sh/kprobes: respect gdb breakpoints

2015-08-07 Thread Jim Keniston
when its gdb breakpoint is hit. Signed-off-by: Jim Keniston Signed-off-by: Reza Arbab Reported-by: Vijay Kumar Tested-by: Vijay Kumar --- arch/sh/include/asm/kprobes.h |2 ++ arch/sh/kernel/kprobes.c |5 - 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ar

Re: [PATCH] x86: remove arbitrary instruction size limit in instruction decoder

2014-11-13 Thread Jim Keniston
; > Signed-off-by: Dave Hansen Acked-by: Jim Keniston -- 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://www.tux.org/lkml/

Re: [PATCH 2/3] uprobes: fix 1-byte opcode tables

2014-07-07 Thread Jim Keniston
I've at least verified that all your code changes are consistent with your comments. Ditto for patch #3. Patches 1-3: Reviewed-by: Jim Keniston On Fri, 2014-07-04 at 15:03 +0200, Denys Vlasenko wrote: > This change fixes 1-byte opcode tables so that only insns > for which we have r

Re: [PATCH 1/3] uprobes: add comment with insn opcodes, mnemonics and why we dont support them

2014-07-07 Thread Jim Keniston
will fix wrong bits > or explain why those bits are not wrong. > > No actual code changes. > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg

Re: [PATCH] uprobes/x86: Rename arch_uprobe->def into ->dflt, minor comment updates

2014-06-02 Thread Jim Keniston
> > 3. Remove the stale part of the comment in arch_uprobe_analyze_insn(). > > Suggested-by: Jim Keniston > Signed-off-by: Oleg Nesterov Looks good. Thanks. Reviewed-by: Jim Keniston > --- > arch/x86/include/asm/uprobes.h |2 +- > arch/x86/kernel/uprobes.c |

Re: [PATCH 1/2] uprobes: add comment with insn opcodes, mnemonics and why we dont support them

2014-05-05 Thread Jim Keniston
will fix wrong bits > or explain why those bits are not wrong. > > No actual code changes. > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg Nesterov All of the following is FYI

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-04 Thread Jim Keniston
On Fri, 2014-05-02 at 17:04 +0200, Denys Vlasenko wrote: > On 05/02/2014 02:48 AM, Jim Keniston wrote: > > On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: > >> +#define VEX2_(insn) X86_VEX_V((insn)->vex_prefix.bytes[1]) > >> +#define VEX3_(i

Re: [PATCH v2] uprobes: fix scratch register selection for rip-relative fixups

2014-05-02 Thread Jim Keniston
ip-relative addressing mode in instructions such as ... is mishandled." ... > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg Nesterov > --- > arch/x86/kernel/uprobes.c | 179 > +

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Jim Keniston
creativity on this. Jim > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg Nesterov > --- > arch/x86/kernel/uprobes.c | 154 > ++ >

Re: [PATCHv4] uprobes: simplify rip-relative handling

2014-05-01 Thread Jim Keniston
ws: Reviewed-by: Jim Keniston > On 05/01, Denys Vlasenko wrote: > > > > v4: Changed arch_uprobe_xol_was_trapped() comment to reflect new logic. > > Hmm. I guess you meant arch_uprobe_post_xol()... please see below. > > > static int default_post_xol_op(struct arch

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-30 Thread Jim Keniston
On Mon, 2014-04-28 at 19:06 +0200, Denys Vlasenko wrote: > Otherwise, instructions such as cmpxchg and div will be mishandled. > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg Nesterov

Re: [PATCH v3] uprobes: simplify rip-relative handling

2014-04-30 Thread Jim Keniston
d on top of Oleg's latest changes and run-tested. > v3: Removed unnecessary cast. > Improved comments based on Oleg's feedback. > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: O

Re: [PATCH 2/3] uprobes/x86: Kill the "autask" arg of riprel_pre_xol()

2014-04-30 Thread Jim Keniston
vaddr. > > > > Remove this argument, change riprel_pre_xol() to use current->utask. > > > > Signed-off-by: Oleg Nesterov > > Acked-by: Srikar Dronamraju > Reviewed-by: Jim Keniston -- To unsubscribe from this list: send the line "unsubscribe linux-kern

Re: [PATCH 3/3] uprobes/x86: Simplify riprel_{pre,post}_xol() and make them similar

2014-04-30 Thread Jim Keniston
t; > > 3. Change these functions to use the new helper and avoid copy-and-paste > >under if/else branches. > > > > Signed-off-by: Oleg Nesterov > > Acked-by: Srikar Dronamraju > Reviewed-by: Jim Keniston -- To unsubscribe from this list: send the l

Re: [PATCH 1/3] uprobes/x86: Rename *riprel* helpers to make the naming consistent

2014-04-30 Thread Jim Keniston
l(), and riprel_post_xol() respectively. > > > > No changes in compiled code. > > > > Signed-off-by: Oleg Nesterov > > Acked-by: Srikar Dronamraju > Reviewed-by: Jim Keniston -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH] uprobes/x86: Refuse to attach uprobe to "word-sized" branch insns

2014-04-24 Thread Jim Keniston
On Thu, 2014-04-24 at 19:33 +0200, Oleg Nesterov wrote: > Thanks! > > Masami, Jim, any acks? Acked-by: Jim Keniston > > On 04/24, Denys Vlasenko wrote: > > > > All branch insns on x86 can be prefixed with the operand-size > > override prefix, 0x66. It wa

Re: [PATCH 5/5] uprobes/x86: Move default_xol_ops's data into arch_uprobe->def

2014-04-24 Thread Jim Keniston
s rip_rela_target_address to riprel_target just > to make this name shorter. > > Signed-off-by: Oleg Nesterov I see a couple of nits in this patch (see below), but the others look good. Patches 1-5 of this set: Reviewed-by: Jim Keniston > --- > arch/x86/include/asm/uprobes.h |

Re: [PATCH 0/5] uprobes/x86: cleanup validate_insn_* paths, fix X86_X32 case

2014-04-24 Thread Jim Keniston
gt; arch/x86/kernel/uprobes.c| 126 > ++++++---- > 2 files changed, 58 insertions(+), 75 deletions(-) > These 5 patches are: Reviewed-by: Jim Keniston -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

Re: [RFC PATCH 4/6] uprobes/x86: Emulate rip-relative call's

2014-04-09 Thread Jim Keniston
On Wed, 2014-04-09 at 14:25 -0700, Jim Keniston wrote: > On Wed, 2014-04-09 at 17:43 +0200, Oleg Nesterov wrote: > > On 04/08, Jim Keniston wrote: > > > > > > On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > > > > 0xe8. Anything else? >

Re: [RFC PATCH v2 0/6] uprobes/x86: fix the reprel jmp/call handling

2014-04-09 Thread Jim Keniston
few minutes ago. Once that's resolved, I consider all your patches so far Reviewed-by: Jim Keniston and Acked-by: Jim Keniston > > Oleg. ... Jim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ke

Re: [RFC PATCH 4/6] uprobes/x86: Emulate rip-relative call's

2014-04-09 Thread Jim Keniston
On Wed, 2014-04-09 at 17:43 +0200, Oleg Nesterov wrote: > On 04/08, Jim Keniston wrote: > > > > On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > > > 0xe8. Anything else? Oleg, thanks for responding to (if not necessarily agreeing with) all my suggestions. I think

Re: [RFC PATCH 6/6] uprobes/x86: Emulate rip-relative conditional "near" jmp's

2014-04-08 Thread Jim Keniston
On Mon, 2014-04-07 at 16:28 +0200, Oleg Nesterov wrote: > On 04/06, Oleg Nesterov wrote: > > > > But I'll try to cleanup this patch... > > See v2 below. > > --- > Subject: [RFC PATCH v2 6/6] uprobes/x86: Emulate rip-relat

Re: [RFC PATCH v2 5/6] uprobes/x86: Emulate rip-relative conditional "short" jmp's

2014-04-08 Thread Jim Keniston
On Mon, 2014-04-07 at 16:27 +0200, Oleg Nesterov wrote: > On 04/06, Oleg Nesterov wrote: > > > > Incomplete, lacks "jcxz". Simple to fix. Anything else? > > Please see v2 below. Simplify the preprocessor hacks. > > --- >

Re: [RFC PATCH 4/6] uprobes/x86: Emulate rip-relative call's

2014-04-08 Thread Jim Keniston
On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > 0xe8. Anything else? No, I think e8 is the only call instruction uprobes will see. > The following couple of paragraphs should be included in the code, perhaps merged with some of the related comments already there. Without it, the code

Re: [RFC PATCH 1/6] uprobes/x86: Emulate unconditional rip-relative jmp's

2014-04-08 Thread Jim Keniston
On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > 0xeb and 0xe9. Anything else? For unconditional rip-relative jumps, yes, I'm pretty sure that's it. > > TODO: move ->fixup into the union along with rip_rela_target_address. > > Reported-by: Jonathan Lebon > Signed-off-by: Oleg Nesterov

Re: [RFC PATCH 3/6] uprobes/x86: Introduce sizeof_long(), cleanup adjust_ret_addr() and arch_uretprobe_hijack_return_addr()

2014-04-07 Thread Jim Keniston
On Mon, 2014-04-07 at 13:34 -0700, Jim Keniston wrote: > On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > > 1. Add the trivial sizeof_long() helper and change other callers of > >is_ia32_task() to use it. > > > ... > > This hunk #3 doesn't apply

Re: [RFC PATCH 3/6] uprobes/x86: Introduce sizeof_long(), cleanup adjust_ret_addr() and arch_uretprobe_hijack_return_addr()

2014-04-07 Thread Jim Keniston
On Sun, 2014-04-06 at 22:16 +0200, Oleg Nesterov wrote: > 1. Add the trivial sizeof_long() helper and change other callers of >is_ia32_task() to use it. > ... This hunk #3 doesn't apply for me. I can't find in your patch sets where you added the lines being replaced (and they weren't there o

Re: [RFC PATCH 0/6] uprobes/x86: fix the reprel jmp/call handling

2014-04-07 Thread Jim Keniston
On Sun, 2014-04-06 at 22:15 +0200, Oleg Nesterov wrote: > On 04/04, Jim Keniston wrote: > > > > On Fri, 2014-04-04 at 21:32 +0200, Oleg Nesterov wrote: > > > > > > 1. Why insn_get_displacement() doesn't work? See "HELP!!!" > > > belo

Re: [PATCH v2 0/9] uprobes/x86: preparations to fix the reprel jmp/call handling.

2014-04-04 Thread Jim Keniston
On Fri, 2014-04-04 at 21:32 +0200, Oleg Nesterov wrote: > On 04/04, Oleg Nesterov wrote: > > > > Now let me send the draft RFC patch which fixes the "call" handling... > > Damn. apparently I can't understand lib/insn.c... > > Please see the draft below. Lets ignore 32bit tasks, lets ignore jmp's,

Re: [PATCH v2 9/9] uprobes/x86: Teach arch_uprobe_post_xol() to restart if possible

2014-04-04 Thread Jim Keniston
On Fri, 2014-04-04 at 20:51 +0200, Oleg Nesterov wrote: > SIGILL after the failed arch_uprobe_post_xol() should only be used as > a last resort, we should try to restart the probed insn if possible. > > Currently only adjust_ret_addr() can fail, and this can only happen if > another thread unmappe

Re: [PATCH 0/7] uprobes/x86: introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-02 Thread Jim Keniston
+), 197 deletions(-) > I've reviewed all 7 patches. Aside from a couple of nits (noted elsewhere) that Oleg inherited, it looks good so far. Reviewed-by: Jim Keniston -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH 5/7] uprobes/x86: Gather "riprel" functions together

2014-04-02 Thread Jim Keniston
On Mon, 2014-03-31 at 21:44 +0200, Oleg Nesterov wrote: ... > +static void > +handle_riprel_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs, > long *correction) > +{ > + if (auprobe->fixups & (UPROBE_FIX_RIP_AX | UPROBE_FIX_RIP_CX)) { > + struct arch_uprobe_task *autask;

Re: [PATCH 7/7] uprobes/x86: Introduce uprobe_xol_ops and arch_uprobe->ops

2014-04-02 Thread Jim Keniston
On Mon, 2014-03-31 at 21:44 +0200, Oleg Nesterov wrote: ... > +/* > + * Adjust the return address pushed by a call insn executed out of line. > + */ > +static int adjust_ret_addr(unsigned long sp, long correction) > +{ > + int rasize, ncopied; > + long ra = 0; > + > + if (is_ia32_task()

Re: [PATCH 3/7] uprobes/x86: Conditionalize the usage of handle_riprel_insn()

2014-04-02 Thread Jim Keniston
ould be better. And if nothing else, ->emulate is a) simple > and b) should likely succeed and make the probing faster. > > But perhaps I missed something? > > Oleg. > Jim Keniston IBM Linux Technology Center -- To unsubscribe from this list: send the line "unsu

Re: [PATCH -mm] kprobes: kretprobe user entry-handler (updated)

2008-01-29 Thread Jim Keniston
On Sat, 2008-01-26 at 23:52 +0530, Abhishek Sagar wrote: > This is a repost of a patch which was reviewed earlier at: > http://lkml.org/lkml/2007/11/13/58 (thanks to Jim Keniston and Srinivasa for > their review comments). This provides support to add an optional user defined > ca

Re: [PATCH] Kprobes: Add kprobes smoke tests that run on boot

2008-01-09 Thread Jim Keniston
On Wed, 2008-01-09 at 22:21 +0100, Andi Kleen wrote: > On Wed, Jan 09, 2008 at 12:24:00PM -0800, Jim Keniston wrote: > > On Wed, 2008-01-09 at 00:28 +0100, Andi Kleen wrote: > > > > I have no problem with that, but if we want to make it buildable as a > > > > modul

Re: [PATCH] Kprobes: Add kprobes smoke tests that run on boot

2008-01-09 Thread Jim Keniston
On Wed, 2008-01-09 at 00:28 +0100, Andi Kleen wrote: > > I have no problem with that, but if we want to make it buildable as a > > module, the call to get_kprobe() needs to be replaced with some other > > gcc-inline-defeating mechanism, or we need to export get_probe(). I > > It's still unclear w

Re: [PATCH] Kprobes: Add kprobes smoke tests that run on boot

2008-01-08 Thread Jim Keniston
former, since get_kprobe() is a kprobes-internal function. Anybody know an architecture-independent way (other than noinline, which doesn't always work) of making gcc decide not to inline a function? E.g., does taking (and using) the function's address do it? Ji

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-26 Thread Jim Keniston
On Wed, 2007-11-21 at 15:50 +0530, Abhishek Sagar wrote: > On 11/21/07, Jim Keniston <[EMAIL PROTECTED]> wrote: > > I have one minor suggestion on the code -- see below -- but I'm willing > > to ack that with or without the suggested change. Please also see > > su

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-20 Thread Jim Keniston
On Mon, 2007-11-19 at 17:56 +0530, Abhishek Sagar wrote: > On Nov 17, 2007 6:24 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: > > > True, some kind of data pointer/pouch is essential. > > > > Yes. If the pouch idea is too weird, then the data pointer is a good > >

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-16 Thread Jim Keniston
rence when we run low on kretprobe_instances. More comments below. On Fri, 2007-11-16 at 23:20 +0530, Abhishek Sagar wrote: > On Nov 16, 2007 2:46 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: ... > > > > There are three problems in the "data pouch" approach, which i

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-16 Thread Jim Keniston
On Sat, 2007-11-17 at 00:23 +0530, Abhishek Sagar wrote: > On Nov 16, 2007 5:37 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-11-15 at 20:30 +0530, Abhishek Sagar wrote: > > > On Nov 15, 2007 4:21 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: &

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-15 Thread Jim Keniston
On Thu, 2007-11-15 at 20:30 +0530, Abhishek Sagar wrote: > On Nov 15, 2007 4:21 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: > > 2. Simplify the task of correlating data (e.g., timestamps) between > > function entry and function return. > > Would adding of data and len

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-15 Thread Jim Keniston
On Thu, 2007-11-15 at 18:46 +0530, Abhishek Sagar wrote: > On Nov 15, 2007 4:21 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: ... > > First of all, some general comments. We seem to be trying to solve two > > problems here: > > 1. Prevent the asymmetry in entry- vs. re

Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-14 Thread Jim Keniston
= sched_clock(); > set_bit(0, &flag); > } > > I think something like this should do the trick for you. Since flag is static, it seems to me that if there were instances of the probed function active concurrently in multiple tasks, only the first-called instance would be profiled. > > > Thanks > > Srinivasa DS > > -- > Thanks & Regards > Abhishek Sagar Jim Keniston - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] utrace: remove exports

2007-04-18 Thread Jim Keniston
g and controlling user threads. This is the foundation for writing tracing engines, which can be loadable kernel modules." If we can't use utrace to write ad hoc instrumentation modules (i.e., because utrace_attach(), utrace_detach(), etc. are no longer exported), then utrace's usefuln

Re: [PATCH] markers-linker-generic

2007-04-11 Thread Jim Keniston
On Wed, 2007-04-11 at 15:21 -0400, Mathieu Desnoyers wrote: > * Andrew Morton ([EMAIL PROTECTED]) wrote: > > On Wed, 11 Apr 2007 13:51:11 -0400 > > Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > > > > > What's this marker stuff about? > > > > > > > > > > Hi Russel, > > > > > > Here is an over

[PATCH] Fix kprobes handling of simultaneous probe hit/unregister

2005-08-31 Thread Jim Keniston
oint in a tight loop. Please apply. Acked-by: Prasanna S Panchamukhi <[EMAIL PROTECTED]> Signed-off-by: Jim Keniston <[EMAIL PROTECTED]> --- linux-2.6.13/arch/i386/kernel/kprobes.c 2005-08-30 12:27:35.0 -0700 +++ linux-fixed/arch/i386/kernel/kprobes.c 2005-08-30 15:

Re: [PATCH] Add Documentation/kprobes.txt

2005-08-03 Thread Jim Keniston
On Wed, 2005-08-03 at 03:41, Suparna Bhattacharya wrote: > On Tue, Aug 02, 2005 at 03:20:06PM -0700, Jim Keniston wrote: > > The enclosed patch creates Documentation/kprobes.txt, a guide to using > > the existing Kprobes facility for dynamic kernel instrumentation. &

[PATCH] Add Documentation/kprobes.txt

2005-08-02 Thread Jim Keniston
The enclosed patch creates Documentation/kprobes.txt, a guide to using the existing Kprobes facility for dynamic kernel instrumentation. Please apply. Jim Keniston Acked-by: Prasanna S Panchamukhi <[EMAIL PROTECTED]> Signed-off-by: Jim Keniston <[EMAIL PROTECTED]> --- linux.old/D

Re: [PATCH 2.6.12-rc1-mm3] [1/2] kprobes += function-return

2005-04-11 Thread Jim Keniston
On Tue, 2005-04-05 at 10:19, Jim Keniston wrote: > On Mon, 2005-04-04 at 01:15, Prasanna S Panchamukhi wrote: > ... > > int register_returnprobe(struct rprobe *rp) { > ... > > > independent of kprobe and jprobe. > ... > > > > make unregister

Re: [PATCH 2.6.12-rc1-mm3] [1/2] kprobes += function-return

2005-04-05 Thread Jim Keniston
n't need to initialize the (nonexistent) rp pointer. Probably not a huge deal.) OR 2. Create the ability to (a) register kprobes, jprobes, and/or retprobes in a disabled state; and (b) enable a group of probes in an atomic operation. Then you could register the entry and return probes in