public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prasanna S Panchamukhi <prasanna@in.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Zachary Amsden <zach@vmware.com>,
	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>,
	Ingo Molnar <mingo@elte.hu>,
	ananth@in.ibm.com, anil.s.keshavamurthy@intel.com,
	davem@davemloft.net
Subject: Re: [PATCH 19/21] i386 Kprobes semaphore fix
Date: Mon, 14 Nov 2005 11:24:57 +0530	[thread overview]
Message-ID: <20051114055457.GA26887@in.ibm.com> (raw)
In-Reply-To: <200511111625.57165.ak@suse.de>

> > Let me stress that if you are running on modified segment state, you
> > have no way to safely determine the virtual address on which you took an
> > instruction trap (int3, general protection, etc..).  If you can't
> > determine the virtual address safely, you can't back out your code patch
> > to remove the breakpoint.  At this point, you can't execute the next
> 
> Kernel kprobes solves this by executing the code out of line. I don't know
> how they want to do that in user space though (need a safe address for that),
> but somehow that can be likely done.

In case of user space probes we adopt a similar method for executing the code
out-of-line. In user space probes  we find free space in the current
 process address space and copy the original instruction to that location and
 execute that instruction from that location. User processes use stack space
 to store local variables, agruments and return values. Normally the stack
 space either below or above the stack pointer indicates the free stack space.
Also in case of no stack free space, we can expand the process stack, copy the 
instruction and execute the instruction from that location.
Detials about this method is discussed on systemtap mailing lists. URL is below.

http://sourceware.org/ml/systemtap/2005-q3/msg00542.html

Please let me know if you have any other solution to the above problem.

Thanks
Prasanna
-- 
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-25044636

  reply	other threads:[~2005-11-14  5:52 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
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 [this message]
     [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=20051114055457.GA26887@in.ibm.com \
    --to=prasanna@in.ibm.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=pratap@vmware.com \
    --cc=torvalds@osdl.org \
    --cc=virtualization@lists.osdl.org \
    --cc=zach@vmware.com \
    --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