From: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
To: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Richard J Moore <richardj_moore@uk.ibm.com>,
suparna@in.ibm.com, Martin Hunt <hunt@redhat.com>,
Jim Keniston <jkenisto@us.ibm.com>,
SystemTAP <systemtap@sources.redhat.com>
Subject: Re: kprobe fault handling
Date: Thu, 09 Feb 2006 16:33:00 -0000 [thread overview]
Message-ID: <20060209083238.A4716@unix-os.sc.intel.com> (raw)
In-Reply-To: <20060209072338.GA2902@in.ibm.com>; from prasanna@in.ibm.com on Wed, Feb 08, 2006 at 11:23:38PM -0800
>
> arch/i386/kernel/kprobes.c | 32 +++++++++++++++++++++++++++++---
> 1 files changed, 29 insertions(+), 3 deletions(-)
>
> if (kcb->kprobe_status & KPROBE_HIT_SS) {
> + /*
> + * We are here because the instruction being single
> stepped
> + * caused a page fault. We reset the current kprobe
> and the
> + * eip points back to the probe address and allow the
> page
> + * fault handler.
> + */
> resume_execution(cur, regs, kcb);
resume_execution() tries to fixup the relative IP address and/or
tries to fixup branch address as if we were successfull in single stepping.
I think we just need to point eip back to probed address here.
Also as Bibo pointed out, not sure how do_page_faulut() function can fix up the
page we are trying to single step as the current eip in the regs points to
probed address.
>
> reset_current_kprobe();
Need to handle KPROBE_REENTER case here, i.e
if(kcb->kprobe_status & KPROBE_REENTER) {
restore_previous_kprobe();
} else {
reset_current_kprobe();
}
> preempt_enable_no_resched();
-anil
next prev parent reply other threads:[~2006-02-09 16:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 19:49 Martin Hunt
2006-02-07 0:51 ` Jim Keniston
2006-02-07 17:31 ` Jim Keniston
2006-02-07 17:50 ` Martin Hunt
2006-02-07 19:49 ` Jim Keniston
2006-02-08 4:38 ` Suparna Bhattacharya
2006-02-08 11:32 ` Richard J Moore
2006-02-09 7:23 ` Prasanna S Panchamukhi
2006-02-09 16:33 ` Keshavamurthy Anil S [this message]
2006-02-09 21:35 ` Jim Keniston
2006-02-09 22:06 ` Martin Hunt
2006-02-10 5:39 ` Martin Hunt
2006-02-10 21:46 ` Frank Ch. Eigler
2006-02-10 21:55 ` Martin Hunt
2006-02-10 22:12 ` Frank Ch. Eigler
2006-02-10 22:17 ` Martin Hunt
2006-02-10 22:20 ` Frank Ch. Eigler
2006-02-10 22:41 ` Martin Hunt
2006-02-10 22:47 ` Frank Ch. Eigler
2006-02-10 23:36 ` Martin Hunt
2006-02-11 0:49 ` Frank Ch. Eigler
2006-02-12 1:26 ` Martin Hunt
2006-02-13 13:39 ` Frank Ch. Eigler
-- strict thread matches above, loose matches on Subject: below --
2006-02-09 8:55 Mao, Bibo
2006-02-09 10:22 ` Richard J Moore
2006-02-07 22:19 Keshavamurthy, Anil S
2006-02-07 20:36 Keshavamurthy, Anil S
2006-02-07 20:48 ` Martin Hunt
2005-09-06 12:56 Prasanna S Panchamukhi
2005-09-06 15:09 ` Frank Ch. Eigler
2005-09-08 11:52 ` Prasanna S Panchamukhi
2005-09-08 17:42 ` Frank Ch. Eigler
2005-09-06 1:06 Frank Ch. Eigler
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=20060209083238.A4716@unix-os.sc.intel.com \
--to=anil.s.keshavamurthy@intel.com \
--cc=hunt@redhat.com \
--cc=jkenisto@us.ibm.com \
--cc=prasanna@in.ibm.com \
--cc=richardj_moore@uk.ibm.com \
--cc=suparna@in.ibm.com \
--cc=systemtap@sources.redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).