From: Benjamin LaHaise <bcrl@kvack.org>
To: Mateusz Berezecki <mateuszb@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: memory range R/W triggered breakpoints in kernel ?
Date: Sun, 5 Mar 2006 18:16:54 -0500 [thread overview]
Message-ID: <20060305231654.GB20768@kvack.org> (raw)
In-Reply-To: <aec8d6fc0603050900w7aa1f93due29e9c1cf87e9316@mail.gmail.com>
On Sun, Mar 05, 2006 at 06:00:34PM +0100, Mateusz Berezecki wrote:
> I was thinking about writing some memory R/W access monitor. The only
> concern I'm
> having is whether it is doable, or are there any already existing and
> working solutions like
> that for Linux?
Most CPUs implement memory breakpoints of some sort, although they're
usually limited to specific address instead of ranges. See gdb's
watch/awatch/rwatch commands.
> which was read/written from certain address. Afterwards the whole page
> would be marked as non present again.
Use mprotect() and do it in userspace by catching SIGSEGV. Doing it for
the kernel is non-trivial and will hit upon arch specific issues like
double fault handlers. Given that the same sort of debugging can be done
in userspace with UML and gdb, there isn't terribly much incentive to do
the work to make something like this happen.
-ben
--
"Time is of no importance, Mr. President, only life is important."
Don't Email: <dont@kvack.org>.
next prev parent reply other threads:[~2006-03-05 23:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-05 17:00 Mateusz Berezecki
2006-03-05 23:16 ` Benjamin LaHaise [this message]
2006-03-05 23:31 ` Mateusz Berezecki
2006-03-05 23:32 ` Benjamin LaHaise
2006-03-06 22:00 ` Pavel Machek
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=20060305231654.GB20768@kvack.org \
--to=bcrl@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mateuszb@gmail.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
all inboxes | Powered by JetHome®