From: "Chris Friesen" <cfriesen@nortel.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
tglx@linutronix.de, mingo@redhat.com,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Subject: debug registers, write breakpoints, and x86
Date: Fri, 19 Mar 2010 15:33:27 -0600 [thread overview]
Message-ID: <4BA3EDA7.1080702@nortel.com> (raw)
Hi,
I'm running 2.6.27 on x86 (64-bit) and I have what appears to be a
memory trampler. I'd like to use a write breakpoint on the address
being trampled to see who's doing it.
>From what I understand, I'll need to set one of DR0-3 (let's use DR3) to
my address of interest, then set the L3, G3, RW3, and LEN3 fields in
DR7. Then when the exception fires we'll handle it in do_debug(). Is
this right?
Given that I want this to be global and permanent, I'm a bit confused by
the code in __switch_to_xtra(). If any other task has TIF_DEBUG set
will this end up overwriting my debug register settings? Is there any
way (other than modifying the code) to ensure that my settings are
permanent?
I'd appreciate any comments you might have.
Thanks,
Chris Friesen
reply other threads:[~2010-03-19 21:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4BA3EDA7.1080702@nortel.com \
--to=cfriesen@nortel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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