lkml.org 
[lkml]   [2005]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 19/21] i386 Kprobes semaphore fix
Prasanna S Panchamukhi wrote:

>On Wed, Nov 09, 2005 at 09:52:40AM -0800, Zachary Amsden wrote:
>
>
>>Ingo Molnar wrote:
>>
>>
>>
>>>* Zachary Amsden <zach@vmware.com> wrote:
>>>
>>>
>>>
>>>
>>>
>>>>>I believe user space kprobes are being worked on by some IBM India folks
>>>>>yes.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>I'm convinced this is pointless. What does it buy you over a ptrace
>>>>based debugger? Why would you want extra code running in the kernel
>>>>that can be done perfectly well in userspace?
>>>>
>>>>
>>>>
>>>>
>>>kprobes are not just for 'debuggers', they are also used for tracing and
>>>other dynamic instrumentation in projects like systemtap. Ptrace is way
>>>too slow and limited for things like that.
>>>
>>>
>>>
>>>
>>Well, if there is a justification for it, that means we really should
>>handle all the nasty EIP conversion cases due to segmentation and v8086
>>mode in the kprobes code. I was hoping that might not be the case.
>>
>>
>>
>
>As Ingo mentioned above, Systemtap uses kprobes infrastructure to provide
>dynamic kernel instrumentation. Using which user can add lots of probes
>easily, so we need to take care of this fast path.
>
>Instead of calling convert_eip_to_linear() for all cases, you can
>just check if it is in kernel mode and calculate the address directly
>
> if (kernel mode)
> addr = regs->eip - sizeof(kprobe_opcode_t);
> else
> addr = convert_eip_to_linear(..);
>
>there by avoiding call to convert_eip_to_linear () for every kernel probes.
>
>As Andi mentioned user space probes support is in progress and
>this address conversion will help in case of user space probes as well.
>

I like this better. I have to rework that patch anyways, since it no
longer applies cleanly.

Zach

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

\
 
 \ /
  Last update: 2005-11-10 16:01    [W:1.845 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site