lkml.org 
[lkml]   [2008]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] kprobes: Introduce is_kprobe_fault()
    From
    Date
    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
    > > +++ b/arch/x86/mm/fault_32.c
    > > @@ -33,28 +33,6 @@
    > >
    > > extern void die(const char *,struct pt_regs *,long);
    > >
    > > -#ifdef CONFIG_KPROBES
    > > -static inline int notify_page_fault(struct pt_regs *regs)
    > > -{
    > > - int ret = 0;
    > > -
    > > - /* kprobe_running() needs smp_processor_id() */
    > > - if (!user_mode_vm(regs)) {
    > ^^^^^^^^^^^
    > For x86_32, this check is important. See commit
    > 6444541671bd821b950dbaafee70d65188198aa6 (Never allow int3 traps
    > from V8086 mode to enter the kprobes handler) for precise reason why its
    > user_mode_vm() and not user_mode() for x86_32.
    >
    > You'll need to make room for this check in the generic macro below...

    Or just keep X86_32 using its existing notify_page_fault, everyone else
    can use the new is_kprobe_fault. I'll wait for a bit and see if
    the s390 or avr32 people respond before resending.

    Harvey





    \
     
     \ /
      Last update: 2008-01-03 18:41    [W:5.836 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site