lkml.org 
[lkml]   [2002]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] (re-xmit): kprobes for i386
From
Date
> > > +	if (kprobe_running() && kprobe_fault_handler(regs, trapnr))
> > > + return;
> > > if (!(regs->xcs & 3))
> > > goto kernel_trap;
> > The kprobe check should be after the kernel_trap label.
>
> No. The entire *point* of being able to register a kprobe fault
> handler is to be able to handle any kernel faults yourself if you want
> to.
It seems you have misunderstood my point.
My idea is that since kprobes are only used for kernel mode address, we
should move the kprobe check in the code that executes after we check
that the fault is happening in kernel mode.

Soemthing like this:
if (!(regs->xcs & 3))
goto kernel_trap;

[...]

kernel_trap:
if (kprobe_running() && kprobe_fault_handler(regs, trapnr))
return;

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.054 / U:2.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site