public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* debug registers, write breakpoints, and x86
@ 2010-03-19 21:33 Chris Friesen
  0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2010-03-19 21:33 UTC (permalink / raw)
  To: Linux Kernel Mailing List, tglx, mingo, H. Peter Anvin, x86

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-19 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-19 21:33 debug registers, write breakpoints, and x86 Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox