Re: [PATCHv4] kprobes: Introduce kprobe_handle_fault()

From: Harvey Harrison
Date: Wed Jan 09 2008 - 19:25:36 EST


On Thu, 2008-01-10 at 00:16 +0100, Heiko Carstens wrote:
> > arch/avr32/mm/fault.c | 21 +--------------------
> > arch/ia64/mm/fault.c | 24 +-----------------------
> > arch/powerpc/mm/fault.c | 25 +------------------------
> > arch/s390/mm/fault.c | 25 +------------------------
> > arch/sparc64/mm/fault.c | 23 +----------------------
> > arch/x86/mm/fault_64.c | 23 ++---------------------
> > include/linux/kprobes.h | 17 +++++++++++++++++
> > 7 files changed, 24 insertions(+), 134 deletions(-)
>
> Somehow I think you missed arch/x86/mm/fault_32.c :)
>

X86_32 _needs_ !user_mode_vm() as opposed to all of the others needing
!user_mode(), I was planning to deal with this in the unification of
fault_32|64.c at a later date. So for now X86_32 will not use this.

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

>
> Uhm.. yes. 14 is HFP-Significance exception. That doesn't make too much
> sense. Passing error_code here would be the right thing to do.
> Also I just checked with David Wilder: system tap itself doesn't have any
> fault handlers. So it should be safe to change this.

OK, I will send a two patch series as per Christoph's request and will
include the s390 error_code fix instead of 14.

Cheers,

Harvey

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/