linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schuldei <andreas@schuldei.org>
To: Keith Owens <kaos@sgi.com>
Cc: Andreas Schuldei <andreas@schuldei.org>, linux-kernel@vger.kernel.org
Subject: Re: kdb against memory corruption?
Date: Mon, 7 Oct 2002 19:11:41 +0200	[thread overview]
Message-ID: <20021007171140.GD1102@lukas> (raw)
In-Reply-To: <10888.1033981406@kao2.melbourne.sgi.com>

* Keith Owens (kaos@sgi.com) [021007 11:03]:

[... lots of good doc ...]

> I just ran some tests to make sure and kdb bph works as described
> above.  Things to watch out for :-
> 
>   bph is current cpu only, use bpha for all cpus.  Is your box SMP?

No, UP.

>   Address must be a multiple of the length.
> 
> It is easier to pick a single byte that you know is being changed and
> just watch that byte, with bpha <address> dataw 1.

yes, those criteria match.

Does it work for the memset way of setting stuff? does the
debuginterface catch this, too, for you?
<memset+14>: repz stos %al,%es:(%edi)

an other idea (by erikm) was that virutal and physical address
mode is mixed up. how do i find out which one is used by kdb and the
debug interface of the cpu? do i need to convert, somehow?

Or is something else wrong with what i do?


During bootup i am dumped into the debugger because my breakpoint funktion was reached:


TTY 7: ef8f8000
&FLIP.char_buf_ptr: ef8f8168
Instruction(i) breakpoint #0 at 0xc016d428 (adjusted)
0xc016d428 tty_kdb_bp:         int3

Entering kdb (current=0xef90c000, pid 28) due to Breakpoint @ 0xc016d428
kdb> md 0xef8f8168 1
0xef8f8168 ef8f8574 00000000 00000000 00000000   t..ï............
kdb> bpha 0xef8f8168 dataw 1
Forced Data Write BP #1 at 0xef8f8168
    is enabled in dr0 for 1 bytes globally
kdb> md 0xef8f8168 1
0xef8f8168 ef8f8574 00000000 00000000 00000000   t..ï............
kdb> go


And after bootup is complete, i press Ctrl-A and am dumped into the debugger:


Entering kdb (current=0xc02f6000, pid 0) due to Keyboard Entry
kdb> md 0xef8f8168 1
0xef8f8168 00000000 00000000 00000000 00000000   ................
kdb> bl
Instruction(i) BP #0 at 0xc016d428 (tty_kdb_bp)
    is enabled globally adjust 1
Forced Data Write BP #1 at 0xef8f8168
    is enabled in dr0 for 1 bytes globally
kdb>


so something overwrote the address, but i got no feedback on it.

  reply	other threads:[~2002-10-07 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-06 20:08 kdb against memory corruption? Andreas Schuldei
2002-10-07  9:03 ` Keith Owens
2002-10-07 17:11   ` Andreas Schuldei [this message]
2002-10-07 22:51     ` Andreas Schuldei

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=20021007171140.GD1102@lukas \
    --to=andreas@schuldei.org \
    --cc=kaos@sgi.com \
    --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;
as well as URLs for NNTP newsgroup(s).