[PATCH] sh/kprobes: respect gdb breakpoints

2015-08-07 Thread Jim Keniston
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/arch/sh

[PATCH] sh/kprobes: respect gdb breakpoints

2015-08-07 Thread Jim Keniston
its gdb breakpoint is hit. Signed-off-by: Jim Keniston jkeni...@linux.vnet.ibm.com Signed-off-by: Reza Arbab ar...@linux.vnet.ibm.com Reported-by: Vijay Kumar vkuma...@lenovo.com Tested-by: Vijay Kumar vkuma...@lenovo.com --- arch/sh/include/asm/kprobes.h |2 ++ arch/sh/kernel/kprobes.c

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] x86: remove arbitrary instruction size limit in instruction decoder

2014-11-13 Thread Jim Keniston
). ... Signed-off-by: Dave Hansen dave.han...@linux.intel.com Acked-by: Jim Keniston jkeni...@us.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 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 real r

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

2014-07-07 Thread Jim Keniston
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 Neste

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

2014-07-07 Thread Jim Keniston
or explain why those bits are not wrong. No actual code changes. Signed-off-by: Denys Vlasenko dvlas...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri...@linux.vnet.ibm.com CC: Ingo Molnar mi...@kernel.org CC: Oleg

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 jkeni...@us.ibm.com 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

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] uprobes/x86: Rename arch_uprobe-def into -dflt, minor comment updates

2014-06-02 Thread Jim Keniston
in arch_uprobe_analyze_insn(). Suggested-by: Jim Keniston jkeni...@us.ibm.com Signed-off-by: Oleg Nesterov o...@redhat.com Looks good. Thanks. Reviewed-by: Jim Keniston jkeni...@us.ibm.com --- arch/x86/include/asm/uprobes.h |2 +- arch/x86/kernel/uprobes.c | 37

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

2014-05-05 Thread Jim Keniston
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. Th

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

2014-05-05 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] uprobes: fix scratch register selection for rip-relative fixups

2014-05-05 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_(insn) X86_VEX_V((insn

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

2014-05-05 Thread Jim Keniston
or explain why those bits are not wrong. No actual code changes. Signed-off-by: Denys Vlasenko dvlas...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri...@linux.vnet.ibm.com CC: Ingo Molnar mi...@kernel.org CC: Oleg

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 v2] uprobes: fix scratch register selection for rip-relative fixups

2014-05-02 Thread Jim Keniston
mode in instructions such as ... is mishandled. ... Signed-off-by: Denys Vlasenko dvlas...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri...@linux.vnet.ibm.com CC: Ingo Molnar mi...@kernel.org CC: Oleg Nesterov o

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

2014-05-01 Thread Jim Keniston
y 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 > ++ > 1 file ch

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

2014-05-01 Thread Jim Keniston
wed-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_uprobe *a

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

2014-05-01 Thread Jim Keniston
-by: Jim Keniston jkeni...@us.ibm.com 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_uprobe *auprobe, struct pt_regs

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

2014-05-01 Thread Jim Keniston
...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri...@linux.vnet.ibm.com CC: Ingo Molnar mi...@kernel.org CC: Oleg Nesterov o...@redhat.com --- arch/x86/kernel/uprobes.c | 154

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: Oleg Nester

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 1/3] uprobes/x86: Rename *riprel* helpers to make the naming consistent

2014-04-30 Thread Jim Keniston
(), and riprel_post_xol() respectively. No changes in compiled code. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Reviewed-by: Jim Keniston jkeni...@us.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

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

2014-04-30 Thread Jim Keniston
if/else branches. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Reviewed-by: Jim Keniston jkeni...@us.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org

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

2014-04-30 Thread Jim Keniston
this argument, change riprel_pre_xol() to use current-utask. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Reviewed-by: Jim Keniston jkeni...@us.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

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

2014-04-30 Thread Jim Keniston
latest changes and run-tested. v3: Removed unnecessary cast. Improved comments based on Oleg's feedback. Signed-off-by: Denys Vlasenko dvlas...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri...@linux.vnet.ibm.com CC

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 dvlas...@redhat.com CC: Jim Keniston jkeni...@us.ibm.com CC: Masami Hiramatsu masami.hiramatsu...@hitachi.com CC: Srikar Dronamraju sri

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
ames 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
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 body of a mes

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

2014-04-24 Thread Jim Keniston
patches are: Reviewed-by: Jim Keniston jkeni...@us.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://www.tux.org/lkml/

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

2014-04-24 Thread Jim Keniston
to make this name shorter. Signed-off-by: Oleg Nesterov o...@redhat.com 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 jkeni...@us.ibm.com --- arch/x86/include/asm/uprobes.h | 12 ++ arch/x86/kernel

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 jkeni...@us.ibm.com On 04/24, Denys Vlasenko wrote: All branch insns on x86 can be prefixed with the operand-size override prefix, 0x66. It was only ever useful

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

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.kernel.

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

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 your code is solid, but I think

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

2014-04-09 Thread Jim Keniston
ttt prefix. Will you agree with s/ttt/branch/ ? Yes. Do you think the code is fine in v2 ? Yes, except for certain comments wrt call emulation. See my reply about patch #4 from a few minutes ago. Once that's resolved, I consider all your patches so far Reviewed-by: Jim Keniston jkeni

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? Oleg, thanks for responding to (if not necessarily agreeing

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

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

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

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 jle...@redhat.com Signed-off-by:

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 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. --- Subject:

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

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 for m

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

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!!!" > > > below. &g

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!!! below. insn-moffset1.value seems to be what you want. Works! Thanks

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

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 for me. I can't find in your patch sets where

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

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

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 unmapped

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, please

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

2014-04-02 Thread Jim Keniston
97 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 majord...

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

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

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

2014-04-02 Thread Jim Keniston
, ->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 "unsubscribe linux-kernel" in the b

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

2014-04-02 Thread Jim Keniston
() altogether, we could just mangle the problematic instructions and complicate arch_uprobe_post_xol(), but I do not think this would 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

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 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 0/7] uprobes/x86: introduce uprobe_xol_ops and arch_uprobe-ops

2014-04-02 Thread Jim Keniston
(noted elsewhere) that Oleg inherited, it looks good so far. Reviewed-by: Jim Keniston jkeni...@us.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 -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 &

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 callback to be run

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

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 where

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 module, the call to get_kprobe() needs

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

2008-01-08 Thread Jim Keniston
er, 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? Jim Keniston >

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

2008-01-08 Thread Jim Keniston
-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? Jim Keniston From Ananth's patch: +static noinline u32 kprobe_target(u32 value) +{ + /* +* gcc ignores noinline

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

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 suggestions on kprobes.txt and the demo

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-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 compromise. With the above reservations

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

2007-11-16 Thread Jim Keniston
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 is a > &

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-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: 2. Simplify the task of correlating data (e.g

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

2007-11-16 Thread Jim Keniston
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 is a generalized case of Srinivasa's timestamp case

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-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. return-handler calls that can develop

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 fields in ri help? Instead

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

2007-11-14 Thread Jim Keniston
is 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][RFC] kprobes: Add user entry-handler in kretprobes

2007-11-14 Thread Jim Keniston
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

Re: [PATCH] utrace: remove exports

2007-04-18 Thread Jim Keniston
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 usefulness is greatly

Re: [PATCH] utrace: remove exports

2007-04-18 Thread Jim Keniston
. 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 usefulness is greatly reduced. Jim Keniston IBM LTC

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

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 overview : I am told that

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

2005-08-31 Thread Jim Keniston
. 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:33:03.0 -07

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

2005-08-31 Thread Jim Keniston
. 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:33:03.0 -0700 @@ -220,7 +220,10

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. &

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. Please apply. ... +Here's how

[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

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

  1   2   >