From: bruce@cs.usyd.edu.au (Bruce Janson)
To: linux-kernel@vger.kernel.org
Subject: the fault address of a traced process
Date: Sun, 30 Sep 2001 22:47:06 +1100 [thread overview]
Message-ID: <20010930125931Z273463-760+18683@vger.kernel.org> (raw)
One process traces another.
When the traced process tries to read, write or execute an unmapped
address it is stopped with a SIGSEGV signal.
The tracer now wants to determine the traced process' faulted address.
According to the (2.2.19) kernel source
.../arch/i386/mm/fault.c:do_page_fault()
such a fault in user mode causes the offending address and error code to
be saved in
tsk->tss.cr2
and
tsk->tss.error_code
respectively. There do not appear to be ptrace() or /proc hooks
to extract this data directly. In earlier unices extraction of this
data would have required grubbing around in /dev/kmem using the
kernel namelist as a guide.
How should a tracer extract this information under a current
(2.2.*, 2.4.*) Linux?
next reply other threads:[~2001-09-30 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-30 11:47 Bruce Janson [this message]
2001-10-01 0:53 ` Jeff Dike
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=20010930125931Z273463-760+18683@vger.kernel.org \
--to=bruce@cs.usyd.edu.au \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®