Re: [PATCH] x86: Introduce __die helper to X86_32

2008-01-08 Thread Harvey Harrison
On Tue, 2008-01-08 at 16:48 -0800, Harvey Harrison wrote: Small step towards unifying traps_32|64.c. No functional changes. Pull out a small helper from an if() statement in die(). Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, I know this will have checkpatch problems, doing

[PATCH] x86: Introduce __die helper to X86_32

2008-01-08 Thread Harvey Harrison
Small step towards unifying traps_32|64.c. No functional changes. Pull out a small helper from an if() statement in die(). Marked as __kprobes as eventually we will want to call this from do_page_fault similar to how X86_64 does it. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch

[PATCH] x86: Use fixup_exception() in traps_64.c

2008-01-08 Thread Harvey Harrison
Use the fixup_exception() helper instead of the open-coded search_extable() users. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, this depends on my patch in x86.git unifying extable.c that introduces fixup_exception() to X86_64. arch/x86/kernel/traps_64.c | 47

[RFC] x86: Add oops_begin, oops_end to X86_32

2008-01-08 Thread Harvey Harrison
()/oops_end(). Small whitespace change in traps_64.c for easier comparison between the two. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/traps_32.c | 137 +++- arch/x86/kernel/traps_64.c | 11 +-- 2 files changed, 76 insertions

[PATCHv3] kprobes: Introduce kprobe_handle_fault()

2008-01-08 Thread Harvey Harrison
. This uncovered a possible bug in the s390 version as that purely copied the x86 version unconditionally passing 14 as the trapnr rather than the error_code parameter. powerpc: Tested-by: Ananth N Mavinakayanahalli [EMAIL PROTECTED] X86-64 Acked-by: Masami Hiramatsu [EMAIL PROTECTED] Signed-off-by: Harvey

Re: [PATCHv3] kprobes: Introduce kprobe_handle_fault()

2008-01-08 Thread Harvey Harrison
On Wed, 2008-01-09 at 07:14 +0100, Heiko Carstens wrote: +/* + * If it is a kprobe pagefault we can not be premptible so return before Missing 'e' in preemptible. OK. However, the old code you removed had a lot of preempt_disable/enable calls that you removed. Hope you checked that

[PATCHv2] kprobes: Introduce is_kprobe_fault()

2008-01-07 Thread Harvey Harrison
a possible bug in the s390 version as that purely copied the x86 version unconditionally passing 14 as the trapnr rather than the error_code parameter. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Andrew, update to my previous patch, with relevant (I hope) maintainers CC'd. Patch a

[PATCHv2] kprobes: Introduce is_kprobe_fault()

2008-01-07 Thread Harvey Harrison
a possible bug in the s390 version as that purely copied the x86 version unconditionally passing 14 as the trapnr rather than the error_code parameter. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Andrew, update to my previous patch, with relevant (I hope) maintainers CC'd. Patch against

Re: [PATCH] kprobes: Introduce is_kprobe_fault()

2008-01-03 Thread Harvey Harrison
On Thu, 2008-01-03 at 12:35 +0530, Ananth N Mavinakayanahalli wrote: > On Wed, Jan 02, 2008 at 08:05:14PM -0800, Harvey Harrison wrote: > > Thanks for the cleanup... > > ... > > > diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c > > index a2273d4..f2e

Re: [PATCH] kprobes: Introduce is_kprobe_fault()

2008-01-03 Thread Harvey Harrison
On Thu, 2008-01-03 at 12:35 +0530, Ananth N Mavinakayanahalli wrote: On Wed, Jan 02, 2008 at 08:05:14PM -0800, Harvey Harrison wrote: Thanks for the cleanup... ... diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index a2273d4..f2e909b 100644 --- a/arch/x86/mm/fault_32.c

[PATCH] kprobes: Introduce is_kprobe_fault()

2008-01-02 Thread Harvey Harrison
-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Andrew, this came up when discussing some x86 fault unification work, figured you were the right person to feed this through. At least the diffstat says I did something right. Patch against current Linus tree. arch/avr32/mm/fault.c

Re: [PATCH] x86: Use is_kprobe_fault to better match usage

2008-01-02 Thread Harvey Harrison
On Wed, 2008-01-02 at 21:36 -0500, Masami Hiramatsu wrote: > Hi Harvey, > > Harvey Harrison wrote: > > Currently the notify_page_fault helper is used to test it the page > > fault was caused by a kprobe causing an early return from do_page_fault. > > > &

[PATCHv2] x86: fault_{32|64}.c unify do_page_fault

2008-01-02 Thread Harvey Harrison
Begin to unify do_page_fault(), easy code movement first. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Ingo, Alexey Dobriyan noticed an obvious typo CONFIG_x86_64 in the previous version, this is a fixed patch. arch/x86/mm/fault_32.c | 38 +-

Re: [PATCH] x86: fault_{32|64}.c unify do_page_fault

2008-01-02 Thread Harvey Harrison
On Thu, 2008-01-03 at 04:45 +0300, Alexey Dobriyan wrote: > On Wed, Jan 02, 2008 at 05:01:02PM -0800, Harvey Harrison wrote: > > Begin to unify do_page_fault(), easy code movement first. > > > > Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> > > ---

[PATCH] x86: fault_{32|64}.c unify do_page_fault

2008-01-02 Thread Harvey Harrison
Begin to unify do_page_fault(), easy code movement first. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Ingo, similar to the kprobes unification patches I did, it gets a bit uglier before it gets better ;-) arch/x86/mm/fault_32.c | 38 +- ar

[PATCH] x86: Use is_kprobe_fault to better match usage

2008-01-02 Thread Harvey Harrison
for preemption. The idea for this comes from a patch by Quentin Barnes to kprobes.c Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Ingo, this may not be functionally equivalent, feel free to yank it out if there is any trouble, but from what I've seen it should be OK. Did you eve

[PATCH] x86: introduce force_sig_info_fault helper to X86_64

2008-01-02 Thread Harvey Harrison
Use the force_sig_info_fault helper from X86_32 in X86_64. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/mm/fault_32.c |2 +- arch/x86/mm/fault_64.c | 31 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/arch/x86/mm/fa

[PATCH] x86: begin fault_{32|64}.c unification

2008-01-02 Thread Harvey Harrison
Move X86_32 only get_segment_eip to X86_64 Move X86_64 only is_errata93 to X86_32 Change X86_32 loop in is_prefetch to highlight the differences between them. Fold the logic from __is_prefetch in as well on X86_32. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/mm/faul

[PATCH] x86: fault_32.c cleanup

2008-01-02 Thread Harvey Harrison
We get die() from kdebug.h, no need for forward declaration. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/mm/fault_32.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index bfb0917..870b561

[PATCH] x86: fault_32.c cleanup

2008-01-02 Thread Harvey Harrison
We get die() from kdebug.h, no need for forward declaration. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/mm/fault_32.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index bfb0917..870b561 100644

[PATCH] x86: begin fault_{32|64}.c unification

2008-01-02 Thread Harvey Harrison
Move X86_32 only get_segment_eip to X86_64 Move X86_64 only is_errata93 to X86_32 Change X86_32 loop in is_prefetch to highlight the differences between them. Fold the logic from __is_prefetch in as well on X86_32. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/mm/fault_32.c

[PATCH] x86: introduce force_sig_info_fault helper to X86_64

2008-01-02 Thread Harvey Harrison
Use the force_sig_info_fault helper from X86_32 in X86_64. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/mm/fault_32.c |2 +- arch/x86/mm/fault_64.c | 31 ++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/arch/x86/mm/fault_32.c

[PATCH] x86: Use is_kprobe_fault to better match usage

2008-01-02 Thread Harvey Harrison
for preemption. The idea for this comes from a patch by Quentin Barnes to kprobes.c Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, this may not be functionally equivalent, feel free to yank it out if there is any trouble, but from what I've seen it should be OK. Did you ever find

Re: [PATCH] x86: fault_{32|64}.c unify do_page_fault

2008-01-02 Thread Harvey Harrison
On Thu, 2008-01-03 at 04:45 +0300, Alexey Dobriyan wrote: On Wed, Jan 02, 2008 at 05:01:02PM -0800, Harvey Harrison wrote: Begin to unify do_page_fault(), easy code movement first. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, similar to the kprobes unification patches I

[PATCHv2] x86: fault_{32|64}.c unify do_page_fault

2008-01-02 Thread Harvey Harrison
Begin to unify do_page_fault(), easy code movement first. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, Alexey Dobriyan noticed an obvious typo CONFIG_x86_64 in the previous version, this is a fixed patch. arch/x86/mm/fault_32.c | 38 +- arch

Re: [PATCH] x86: Use is_kprobe_fault to better match usage

2008-01-02 Thread Harvey Harrison
On Wed, 2008-01-02 at 21:36 -0500, Masami Hiramatsu wrote: Hi Harvey, Harvey Harrison wrote: Currently the notify_page_fault helper is used to test it the page fault was caused by a kprobe causing an early return from do_page_fault. Change the name of the helper to is_kprobe_fault

[PATCH] kprobes: Introduce is_kprobe_fault()

2008-01-02 Thread Harvey Harrison
-off-by: Harvey Harrison [EMAIL PROTECTED] --- Andrew, this came up when discussing some x86 fault unification work, figured you were the right person to feed this through. At least the diffstat says I did something right. Patch against current Linus tree. arch/avr32/mm/fault.c | 21

Re: [PATCH] x86: kprobes change kprobe_handler flow

2008-01-01 Thread Harvey Harrison
Just a few nitpicks. I need to look closer at the reenter_kprobe changes, but it looks like this should lead to clearer flow than before. The whole !p/kprobe_running() differences were pretty twisty before. On Wed, 2008-01-02 at 01:10 +0530, Abhishek Sagar wrote: > Thanks for pointing me to the

Re: [PATCH] x86: kprobes change kprobe_handler flow

2008-01-01 Thread Harvey Harrison
Just a few nitpicks. I need to look closer at the reenter_kprobe changes, but it looks like this should lead to clearer flow than before. The whole !p/kprobe_running() differences were pretty twisty before. On Wed, 2008-01-02 at 01:10 +0530, Abhishek Sagar wrote: Thanks for pointing me to the

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Harvey Harrison
On Sat, 2007-12-29 at 23:04 -0800, H. Peter Anvin wrote: > Masami Hiramatsu wrote: > > Hi Harvey, > > > > Harvey Harrison wrote: > >> Fold some small ifdefs into a helper function. > >> > >> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]&g

Re: [PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-30 Thread Harvey Harrison
On Sat, 2007-12-29 at 23:04 -0800, H. Peter Anvin wrote: Masami Hiramatsu wrote: Hi Harvey, Harvey Harrison wrote: Fold some small ifdefs into a helper function. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Masami, Ingo, I had this left in some unsent kprobes unification

[PATCH] x86: kprobes change kprobe_handler flow

2007-12-27 Thread Harvey Harrison
out: only returns ret Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Masami, noticed a small bug in the previous version in the !p case when the breakpoint was the kernel's. Please review this version. arch/x86/kernel/kprobes.c

[PATCH] x86: kprobes change kprobe_handler flow

2007-12-27 Thread Harvey Harrison
Make the control flow of kprobe_handler more obvious. Collapse the separate if blocks/gotos with if/else blocks this unifies the duplication of the check for a breakpoint instruction race with another cpu. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Masami, please have

[PATCH] x86: kprobes change kprobe_handler flow

2007-12-27 Thread Harvey Harrison
Make the control flow of kprobe_handler more obvious. Collapse the separate if blocks/gotos with if/else blocks this unifies the duplication of the check for a breakpoint instruction race with another cpu. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Masami, please have a look at this, I

[PATCH] x86: kprobes change kprobe_handler flow

2007-12-27 Thread Harvey Harrison
out: only returns ret Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Masami, noticed a small bug in the previous version in the !p case when the breakpoint was the kernel's. Please review this version. arch/x86/kernel/kprobes.c | 60 + 1

[PATCH] x86: Cosmetic fixes fault_{32|64}.c

2007-12-24 Thread Harvey Harrison
and add useful comment from X86_32. Use these defines in X86_32 where obvious. - Unify comments between 32|64 bit - Small ifdef movement for CONFIG_KPROBES in notify_page_fault() - Introduce X86_64 only case statement No Functional Changes. Signed-off-by: Harvey Harrison <[EMAIL PROTEC

[PATCH] x86: Cosmetic fixes fault_{32|64}.c

2007-12-24 Thread Harvey Harrison
and add useful comment from X86_32. Use these defines in X86_32 where obvious. - Unify comments between 32|64 bit - Small ifdef movement for CONFIG_KPROBES in notify_page_fault() - Introduce X86_64 only case statement No Functional Changes. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch

[PATCH] x86: kprobes remove fix_riprel #ifdef

2007-12-23 Thread Harvey Harrison
Move #ifdef around function definiton into the function and unconditionally return on X86_32. Saves an ifdef from the one callsite. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Ingo, Masami, final leftovers from some unsent kprobes unification work. Net reduction of one #ifdef s

[PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-23 Thread Harvey Harrison
Fold some small ifdefs into a helper function. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Masami, Ingo, I had this left in some unsent kprobes unification work. Depends on your tastes, but does reduce ifdefs and is a bit better about self-documenting the REX prefix on X86_64.

[PATCH] x86: Introduce REX prefix helper for kprobes

2007-12-23 Thread Harvey Harrison
Fold some small ifdefs into a helper function. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Masami, Ingo, I had this left in some unsent kprobes unification work. Depends on your tastes, but does reduce ifdefs and is a bit better about self-documenting the REX prefix on X86_64. If I

[PATCH] x86: kprobes remove fix_riprel #ifdef

2007-12-23 Thread Harvey Harrison
Move #ifdef around function definiton into the function and unconditionally return on X86_32. Saves an ifdef from the one callsite. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Ingo, Masami, final leftovers from some unsent kprobes unification work. Net reduction of one #ifdef section

Re: [PATCH] misc: Removal of final callers using fastcall

2007-12-20 Thread Harvey Harrison
On Thu, 2007-12-20 at 18:30 -0800, Andrew Morton wrote: > On Wed, 12 Dec 2007 15:38:26 -0800 Harvey Harrison <[EMAIL PROTECTED]> wrote: > > > Andrew, I'm not sure who is best to hit with these final dribs and > > drabs removing fastcall. Once all of these have hit Lin

Re: [PATCH] misc: Removal of final callers using fastcall

2007-12-20 Thread Harvey Harrison
On Thu, 2007-12-20 at 18:30 -0800, Andrew Morton wrote: On Wed, 12 Dec 2007 15:38:26 -0800 Harvey Harrison [EMAIL PROTECTED] wrote: Andrew, I'm not sure who is best to hit with these final dribs and drabs removing fastcall. Once all of these have hit Linus' tree I will send a final patch

[PATCH] x86: __kprobes annotations

2007-12-18 Thread Harvey Harrison
__always_inline on some static functions was to ensure they ended up in the .kprobes.text section. Mark this explicitly. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ar

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 23:43 -0500, Masami Hiramatsu wrote: > Harvey Harrison wrote: > > On Tue, 2007-12-18 at 08:50 -0500, Masami Hiramatsu wrote: > >> Hi Harvey, > >> > >> Thank you for cleaning this up. > >> > >> Harvey Harrison wrote:

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 08:50 -0500, Masami Hiramatsu wrote: > Hi Harvey, > > Thank you for cleaning this up. > > Harvey Harrison wrote: > > Subject: [PATCH] x86: kprobes leftover cleanups > > > > Eliminate __always_inline, all of these static functions are > &

[PATCH v2] x86: unify module_{32|64}.h

2007-12-18 Thread Harvey Harrison
>From 5be3fc6a0e28d82a05487a8fb1a86532fb0ad4e8 Mon Sep 17 00:00:00 2001 From: Harvey Harrison <[EMAIL PROTECTED]> Date: Tue, 18 Dec 2007 03:58:10 -0800 Subject: [PATCH] x86: unify module_{32|64}.h This adds one case to the MODULE_PROC_FAMILY block testing for X86_64. There are no n

[PATCH] x86: unify module_{32|64}.h

2007-12-18 Thread Harvey Harrison
This adds one case to the MODULE_PROC_FAMILY block testing for X86_64. There are no new things defined on X86_64 than there were before. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/module.h| 83 +- include/a

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 12:29 +0100, Ingo Molnar wrote: > * Harvey Harrison <[EMAIL PROTECTED]> wrote: > > > Sorry I missed an ifdef in this patch in the following hunk: > > could you resend your kprobes cleanups against current x86.git? They > have been conceptually ack

Re: [PATCH] x86: Use helper in fault_64.c

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 12:19 +0100, Ingo Molnar wrote: > * Harvey Harrison <[EMAIL PROTECTED]> wrote: > > > Use the fixup_exception() helper in fault_64.c > > thanks, applied. > > > This is only appropriate if CONFIG_PNP_BIOS cannot be set on X86_64, > >

[PATCH] x86: Use helper in fault_64.c

2007-12-18 Thread Harvey Harrison
Use the fixup_exception() helper in fault_64.c Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- This is only appropriate if CONFIG_PNP_BIOS cannot be set on X86_64, which looks to be the case, but needs confirmation. arch/x86/mm/fault_64.c |5 + 1 files changed, 1 insertions

[PATCH] x86: unify extable_{32|64}.c

2007-12-18 Thread Harvey Harrison
Introduce fixup_exception() on X86_64 and use it in kprobes to eliminate an #ifdef. Only X86_64 needs search_extable() due to a stepping bug. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c | 12 + arch/x86/mm/Makefile_32 |2 +- arch/

[PATCH] x86: unify extable_{32|64}.c

2007-12-18 Thread Harvey Harrison
Introduce fixup_exception() on X86_64 and use it in kprobes to eliminate an #ifdef. Only X86_64 needs search_extable() due to a stepping bug. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c | 12 + arch/x86/mm/Makefile_32 |2 +- arch/x86/mm

[PATCH] x86: Use helper in fault_64.c

2007-12-18 Thread Harvey Harrison
Use the fixup_exception() helper in fault_64.c Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- This is only appropriate if CONFIG_PNP_BIOS cannot be set on X86_64, which looks to be the case, but needs confirmation. arch/x86/mm/fault_64.c |5 + 1 files changed, 1 insertions(+), 4

Re: [PATCH] x86: Use helper in fault_64.c

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 12:19 +0100, Ingo Molnar wrote: * Harvey Harrison [EMAIL PROTECTED] wrote: Use the fixup_exception() helper in fault_64.c thanks, applied. This is only appropriate if CONFIG_PNP_BIOS cannot be set on X86_64, which looks to be the case, but needs confirmation

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 12:29 +0100, Ingo Molnar wrote: * Harvey Harrison [EMAIL PROTECTED] wrote: Sorry I missed an ifdef in this patch in the following hunk: could you resend your kprobes cleanups against current x86.git? They have been conceptually acked by Masami. This cuts out

[PATCH] x86: unify module_{32|64}.h

2007-12-18 Thread Harvey Harrison
This adds one case to the MODULE_PROC_FAMILY block testing for X86_64. There are no new things defined on X86_64 than there were before. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- include/asm-x86/module.h| 83 +- include/asm-x86/module_32

[PATCH v2] x86: unify module_{32|64}.h

2007-12-18 Thread Harvey Harrison
From 5be3fc6a0e28d82a05487a8fb1a86532fb0ad4e8 Mon Sep 17 00:00:00 2001 From: Harvey Harrison [EMAIL PROTECTED] Date: Tue, 18 Dec 2007 03:58:10 -0800 Subject: [PATCH] x86: unify module_{32|64}.h This adds one case to the MODULE_PROC_FAMILY block testing for X86_64. There are no new things defined

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 08:50 -0500, Masami Hiramatsu wrote: Hi Harvey, Thank you for cleaning this up. Harvey Harrison wrote: Subject: [PATCH] x86: kprobes leftover cleanups Eliminate __always_inline, all of these static functions are only called once. Minor whitespace cleanup

Re: [PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-18 Thread Harvey Harrison
On Tue, 2007-12-18 at 23:43 -0500, Masami Hiramatsu wrote: Harvey Harrison wrote: On Tue, 2007-12-18 at 08:50 -0500, Masami Hiramatsu wrote: Hi Harvey, Thank you for cleaning this up. Harvey Harrison wrote: Subject: [PATCH] x86: kprobes leftover cleanups Eliminate

[PATCH] x86: __kprobes annotations

2007-12-18 Thread Harvey Harrison
__always_inline on some static functions was to ensure they ended up in the .kprobes.text section. Mark this explicitly. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel

[PATCH] x86: kprobes use stack_addr() macro

2007-12-17 Thread Harvey Harrison
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Replacement for the last patch in the kprobes series I just sent. arch/x86/kernel/kprobes.c | 45 + 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/arch/x86/kernel/kprob

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 18:14 -0500, Masami Hiramatsu wrote: > Hi Harvey, > > Harvey Harrison wrote: > > On Mon, 2007-12-17 at 16:52 -0500, Masami Hiramatsu wrote: > >> Hi Harvey, > >> Before porting, could you tell me what differences are important

[PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
Sorry I missed an ifdef in this patch in the following hunk: @@ -183,6 +185,9 @@ retry: } switch (opcode & 0xf0) { +#ifdef X86_64 + case 0x40: + goto retry; /* REX prefix is boostable */ case 0x60: if (0x63 < opcode && opcode < 0x67)

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 16:52 -0500, Masami Hiramatsu wrote: > Hi Harvey, > Before porting, could you tell me what differences are important > to you? We can discuss about it. > > > I just sent out a series of 4 patches equivalent to your patches 1-4/6 > > but based on my already unified

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 16:28 -0500, Masami Hiramatsu wrote: > Hi Harvey, > If you mention about a relative jump which is inserted by > resume_execution(), I think you might misunderstand that relative jump. > > The size of that relative jump, which will be embedded by kprobe-booster, is >

[PATCH 4/4] This patch adds kretprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
- Rewrite register saving/restoring code Based on patch from Masami Hiramatsu <[EMAIL PROTECTED]> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Sorry Ingo, I based my other 4/4 off the patch that had the one incorrect ifdef around trampoline_probe_handler. This is based o

[PATCH 2/4] x86: kprobe cleanup resume_execution

2007-12-17 Thread Harvey Harrison
cf) case.to X86_64 - Fold jmp absolute (0xea) handling into iret/ret/lret handling Based on patch from Masami Hiramatsu <[EMAIL PROTECTED]> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(

[PATCH 4/4] This patch adds kretprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
- Rewrite register saving/restoring code Based on patch from Masami Hiramatsu <[EMAIL PROTECTED]> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c | 104 + 1 files changed, 58 insertions(+), 46 deletions(-)

[PATCH 1/4] x86: fix jprobe_saved_sp handling

2007-12-17 Thread Harvey Harrison
- Use jprobe_saved_regs instead getting it from stack. (Especially on x86-64, it may get incorrect data, because pt_regs can not be get by using container_of(rsp)) - Change the type of stack pointer to unsigned long *. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kern

[PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
Based on X86_32, mostly by un-ifdeffing code. Based on patch from Masami Hiramatsu <[EMAIL PROTECTED]> Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- arch/x86/kernel/kprobes.c | 57 +++-- include/asm-x86/kprobes.h | 12 +-

Re: Final kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 17:06 +0100, Ingo Molnar wrote: > * Masami Hiramatsu <[EMAIL PROTECTED]> wrote: > > > > cool! Please Cc: lkml and Harvey as well so that there's less > > > overlap in unification work - Harvey spent quite some time unifying > > > and cleaning up the kprobes code during the

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 19:52 +0530, Srikar Dronamraju wrote: > * 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 > >

Re: [-mm][PATCH 0/6] (yet another) kprobes x86 code unification and boosters

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 17:33 +0100, Ingo Molnar wrote: > * Masami Hiramatsu <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > > I developed a series of patches which unifies kprobes code on x86 and > > introduces boosters on x86-64. These patches can be applied to > > 2.6.24-rc4-mm1. > > > >

Re: [-mm][PATCH 0/6] (yet another) kprobes x86 code unification and boosters

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 17:33 +0100, Ingo Molnar wrote: * Masami Hiramatsu [EMAIL PROTECTED] wrote: Hello all, I developed a series of patches which unifies kprobes code on x86 and introduces boosters on x86-64. These patches can be applied to 2.6.24-rc4-mm1. The purpose of this

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 19:52 +0530, Srikar Dronamraju wrote: * 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,

Re: Final kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 17:06 +0100, Ingo Molnar wrote: * Masami Hiramatsu [EMAIL PROTECTED] wrote: cool! Please Cc: lkml and Harvey as well so that there's less overlap in unification work - Harvey spent quite some time unifying and cleaning up the kprobes code during the past week.

[PATCH 1/4] x86: fix jprobe_saved_sp handling

2007-12-17 Thread Harvey Harrison
jprobe_saved_regs instead getting it from stack. (Especially on x86-64, it may get incorrect data, because pt_regs can not be get by using container_of(rsp)) - Change the type of stack pointer to unsigned long *. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c |8

[PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
Based on X86_32, mostly by un-ifdeffing code. Based on patch from Masami Hiramatsu [EMAIL PROTECTED] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c | 57 +++-- include/asm-x86/kprobes.h | 12 + 2 files changed

[PATCH 2/4] x86: kprobe cleanup resume_execution

2007-12-17 Thread Harvey Harrison
(0xea) handling into iret/ret/lret handling Based on patch from Masami Hiramatsu [EMAIL PROTECTED] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/kprobes.c b/arch

[PATCH 4/4] This patch adds kretprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
- Rewrite register saving/restoring code Based on patch from Masami Hiramatsu [EMAIL PROTECTED] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- arch/x86/kernel/kprobes.c | 104 + 1 files changed, 58 insertions(+), 46 deletions(-) diff --git

[PATCH 4/4] This patch adds kretprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
- Rewrite register saving/restoring code Based on patch from Masami Hiramatsu [EMAIL PROTECTED] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Sorry Ingo, I based my other 4/4 off the patch that had the one incorrect ifdef around trampoline_probe_handler. This is based on your fixed one

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 16:28 -0500, Masami Hiramatsu wrote: Hi Harvey, If you mention about a relative jump which is inserted by resume_execution(), I think you might misunderstand that relative jump. The size of that relative jump, which will be embedded by kprobe-booster, is 5-bytes(not 1

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 16:52 -0500, Masami Hiramatsu wrote: Hi Harvey, Before porting, could you tell me what differences are important to you? We can discuss about it. I just sent out a series of 4 patches equivalent to your patches 1-4/6 but based on my already unified kprobes.c/h, You

[PATCH 3/4] x86: add kprobe-booster to X86_64

2007-12-17 Thread Harvey Harrison
Sorry I missed an ifdef in this patch in the following hunk: @@ -183,6 +185,9 @@ retry: } switch (opcode 0xf0) { +#ifdef X86_64 + case 0x40: + goto retry; /* REX prefix is boostable */ case 0x60: if (0x63 opcode opcode 0x67)

Re: FInal kprobes rollup patches

2007-12-17 Thread Harvey Harrison
On Mon, 2007-12-17 at 18:14 -0500, Masami Hiramatsu wrote: Hi Harvey, Harvey Harrison wrote: On Mon, 2007-12-17 at 16:52 -0500, Masami Hiramatsu wrote: Hi Harvey, Before porting, could you tell me what differences are important to you? We can discuss about it. I've already ported

[PATCH] x86: kprobes use stack_addr() macro

2007-12-17 Thread Harvey Harrison
Signed-off-by: Harvey Harrison [EMAIL PROTECTED] --- Replacement for the last patch in the kprobes series I just sent. arch/x86/kernel/kprobes.c | 45 + 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/arch/x86/kernel/kprobes.c b/arch

[PATCH] NET: ns83820.c remove fastcall macro

2007-12-16 Thread Harvey Harrison
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Dave, this is the remainder of the FASTCALL/fastcall removal patch that is not already in your tree. Generated against net-2.6.25.git drivers/net/ns83820.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff

[PATCH] [NET]: Remove FASTCALL/fastcall macros

2007-12-16 Thread Harvey Harrison
X86_32 was the last user of the FASTCALL/fastcall macros, now that it uses regparm(3) by default, these macros expand to nothing. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Dave, this is a wrap-up of my patch in your net-2.6.25.git with the build breakage fix from Andrew

[PATCH 5/4] x86: local.h fix checkpatch warnings

2007-12-16 Thread Harvey Harrison
Mostly space after comma, one space after if. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/local.h | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h index f5677e2..f852c62

[PATCH 4/4] x86: Unify local_{32|64}.h

2007-12-16 Thread Harvey Harrison
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/local.h| 148 ++- include/asm-x86/local_32.h | 150 include/asm-x86/local_64.h | 134 --- 3

[PATCH 2/4] x86: fix asm memory constraints in local_64.h

2007-12-16 Thread Harvey Harrison
Use the shorter +m form rather than =m and m. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/local_64.h | 30 ++ 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a/include/asm-x86/local_64.h b/include/asm-x86/local_64.h

[PATCH 3/4] x86: Introduce asm helpers in local_{32|64}.h

2007-12-16 Thread Harvey Harrison
Handle the use of long on X86_32 and quad on X86_64 Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/asm.h | 12 include/asm-x86/local.h|2 ++ include/asm-x86/local_32.h | 18 +- include/asm-x86/local_64.h

[PATCH 1/4] x86: clean up local_{32|64}.h

2007-12-16 Thread Harvey Harrison
Common prefix from both files moved to local.h Change __inline__ to inline Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- Ingo, this is the revised series with fixed asm incorporating HPA's comments. include/asm-x86/local.h| 19 +-- include/asm-x86/loca

Re: [PATCH 4/4] x86: Final unification of local_{32|64}.h

2007-12-16 Thread Harvey Harrison
On Sun, 2007-12-16 at 15:48 -0800, H. Peter Anvin wrote: > Harvey Harrison wrote: > > > > Do you have a stylistic preference between these two options: > > > > Option 1) Rely on CPP string constant concatenation > > > > // possibly include trailing space h

Re: [PATCH 4/4] x86: Final unification of local_{32|64}.h

2007-12-16 Thread Harvey Harrison
On Sun, 2007-12-16 at 14:48 -0800, H. Peter Anvin wrote: > Ingo Molnar wrote: > > * Harvey Harrison <[EMAIL PROTECTED]> wrote: > > > >> No differences except for the defintion of local_add_return on X86_64. > >> The X86_32 version is just fine as it is pr

Re: [PATCH 3/4] x86: Unify local_{32|64}.h

2007-12-16 Thread Harvey Harrison
On Sun, 2007-12-16 at 10:18 -0800, H. Peter Anvin wrote: > Harvey Harrison wrote: > > Introduce macros to deal with X86_32 using longs and X86_64 > > using quads. Small comment fixes to make files match. > > > > #define local_read(l) atomic_long_read(&(l)

[PATCH] x86: Unify kexec_{32|64}.h

2007-12-16 Thread Harvey Harrison
One section collecting all constant defines. Ifdef the asm blocks for X86_32/64. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/kexec.h| 169 +++- include/asm-x86/kexec_32.h | 99 -- include/a

[PATCH 4/4] x86: Final unification of local_{32|64}.h

2007-12-16 Thread Harvey Harrison
No differences except for the defintion of local_add_return on X86_64. The X86_32 version is just fine as it is protected with ifdef CONFIG_M386 so use it directly. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/local.h

[PATCH 3/4] x86: Unify local_{32|64}.h

2007-12-16 Thread Harvey Harrison
Introduce macros to deal with X86_32 using longs and X86_64 using quads. Small comment fixes to make files match. Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> --- include/asm-x86/local.h| 17 + include/asm-x86/local_32.h | 28 ++-- i

<    2   3   4   5   6   7   8   >