public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: prasanna@in.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@suse.de>,
	virtualization@lists.osdl.org, Andrew Morton <akpm@osdl.org>,
	Chris Wright <chrisw@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	Martin Bligh <mbligh@mbligh.org>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Christopher Li <chrisl@vmware.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	ananth@in.ibm.com, anil.s.keshavamurthy@intel.com,
	davem@davemloft.net
Subject: Re: [PATCH 19/21] i386 Kprobes semaphore fix
Date: Thu, 10 Nov 2005 06:58:25 -0800	[thread overview]
Message-ID: <43736011.7060902@vmware.com> (raw)
In-Reply-To: <20051110180954.GD8514@in.ibm.com>

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


  reply	other threads:[~2005-11-10 14:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08  4:39 [PATCH 19/21] i386 Kprobes semaphore fix Zachary Amsden
2005-11-08 13:12 ` Andi Kleen
2005-11-08 13:36   ` Zachary Amsden
2005-11-09 13:38     ` Andi Kleen
2005-11-09 16:46       ` Zachary Amsden
2005-11-09 16:58         ` Ingo Molnar
2005-11-09 17:52           ` Zachary Amsden
2005-11-10 18:09             ` Prasanna S Panchamukhi
2005-11-10 14:58               ` Zachary Amsden [this message]
2005-11-10 16:16               ` H. Peter Anvin
2005-11-11 15:27             ` Andi Kleen
2005-11-11 15:25         ` Andi Kleen
2005-11-14  5:54           ` Prasanna S Panchamukhi
     [not found]     ` <20051109093755.GA10361@in.ibm.com>
2005-11-10 16:33       ` Prasanna S Panchamukhi
     [not found] <20051108074430.GG28201@elte.hu>
2005-11-08 13:26 ` Zachary Amsden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43736011.7060902@vmware.com \
    --to=zach@vmware.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@mbligh.org \
    --cc=mingo@elte.hu \
    --cc=prasanna@in.ibm.com \
    --cc=pratap@vmware.com \
    --cc=torvalds@osdl.org \
    --cc=virtualization@lists.osdl.org \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox