From: Gilles Pokam <gpokam@gmail.com>
To: Chris Wedgwood <cw@f00f.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel memory
Date: Thu, 28 Apr 2005 22:33:16 -0700 [thread overview]
Message-ID: <ba8358220504282233754de43b@mail.gmail.com> (raw)
In-Reply-To: <20050429030313.GA10344@taniwha.stupidest.org>
On 4/28/05, Chris Wedgwood <cw@f00f.org> wrote:
> On Thu, Apr 28, 2005 at 04:52:21PM -0700, Gilles Pokam wrote:
>
> > I have a special user application who needs to access any part of
> > the kernel memory.
>
> why & for what?
>
> > My question is therefore how to make the whole memory accessible for
> > that particular application ?
>
> maybe /dev/kmem or /proc/kcore
>
> it would help if you explain in more detail what you are trying to do
>
Here is the big picture of the what (detailed are omitted):
I'm experimenting with system to help developers debug their programs.
The debugger is based on a replayer whose purpose is to
deterministically replay the last millions of instructions that lead
to a crash. On the user site, when the program runs, a trace of load
values along with some architectural state is continuously recorded.
Upon a crash, this trace is sent to the developer for debugging. At
the developer site, the application is replayed as follows. The
architectural state is initialized by reading the values from the
trace. The execution then proceeds as follows. If a load instruction
is encountered, the value is taken from the trace. Otherwise all other
instructions execute normally.
Issues:
Now, there are cases where a load value read from the trace (a virtual
address) raises a pagefault exception at the execution because the
address is invalid (the OS has not mapped this address) or the
accessed page doesn't have the right protection. In such cases,
instead of having the program to segfault, I want to handle this as a
valid pagefault, returning a page at the place. One other constraint
is that the application that is being debugged must not be modified.
I was thinking of making the whole memory accessible to handle this.
But I can not rely on mapping /dev/mem or /proc/kcore into the user
space since this would require modifying the binary. Are there other
ways of doing this ? May be disabling paging ? if so, how to do this ?
Thanks for any suggestions.
Gilles
next prev parent reply other threads:[~2005-04-29 5:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 23:52 Kernel memory Gilles Pokam
2005-04-29 3:03 ` Chris Wedgwood
2005-04-29 5:33 ` Gilles Pokam [this message]
2005-04-29 5:43 ` Chris Wedgwood
2005-04-29 5:48 ` Gilles Pokam
2005-04-29 6:12 ` Chris Wedgwood
2005-04-29 6:45 ` Gilles Pokam
2005-04-29 6:48 ` Chris Wedgwood
2005-04-29 7:12 ` Gilles Pokam
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=ba8358220504282233754de43b@mail.gmail.com \
--to=gpokam@gmail.com \
--cc=cw@f00f.org \
--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