From: Andi Kleen <ak@suse.de>
To: James Courtier-Dutton <James@superbug.co.uk>
Cc: Robert Hancock <hancockr@shaw.ca>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Black box flight recorder for Linux
Date: Sun, 9 Apr 2006 17:04:47 +0200 [thread overview]
Message-ID: <200604091704.47566.ak@suse.de> (raw)
In-Reply-To: <4437E4B7.40208@superbug.co.uk>
On Saturday 08 April 2006 18:28, James Courtier-Dutton wrote:
> Andi Kleen wrote:
> > On Saturday 08 April 2006 16:05, Robert Hancock wrote:
> >> Andi Kleen wrote:
> >>> James Courtier-Dutton <James@superbug.co.uk> writes:
> >>>> Now, the question I have is, if I write values to RAM, do any of those
> >>>> values survive a reset?
> >>> They don't generally.
> >>>
> >>> Some people used to write the oopses into video memory, but that
> >>> is not portable.
> >> I wouldn't think most BIOSes these days would bother to clear system RAM
> >> on a reboot. Certainly Microsoft was encouraging vendors not to do this
> >> because it slowed down system boot time.to
> >
> > Reset button is like a cold boot and it generally ends up with cleared
> > RAM.
> >
> > -Andi
>
> Thank you. That saved me 30mins hacking. :-)
Sorry for having discouraged you.
Actually there is a rare special case - triple fault - where you
might be ok if the BIOS correctly supports the ACPI "bootflag" standard,
but triple faults are relatively rare. They happen when the
kernel screws up so badly that the CPU cannot even run exception
handlers anymore. But I suspect it's too special for this.
First if you're not aware of this - the "official" way right now
to solve this problem is kexec + kdump + a preloaded crash kernel. But in
practice it still has many problems because a lot of drivers cannot
reinitialize the hardware properly. And of course it will users need
to load the crash kernel in advance and lose about 64MB of RAM.
My personal solution to the problem is firescope, but it also has its
drawbacks (needs ohci1394 loaded first, requires a firewire cable)
What I would do for this if you want to hack.- define a generic interface that allows
drivers to register memory storage handlers. Add a entry into the oops die
and panic notifiers that saves the kernel log into these backends.
Then write some Documentation file for it and add a proof of comcept e.g. to the
Nvidia/ATI frame buffer drivers. Then driver writers could expose this functionality
if their hardware supports it or if someone has an embedded platform that
guarantees it they could also use it.
For Nvidia/ATI it might be tricky to get the
X server to keep its hands off the memory, but I assume most graphic cards
these days have more memory than the X server uses at least without 3d (?).
If you're unlucky it will fill up everything with mozilla pixmaps over time though.
In the worst case you would need to define a new interface between X server
and kernel to tell the X server to leave some memory alone.
The generic driver could also do the high level work, like adding proper
checksums and magic values to make sure the data is sane after reboot.
You would also need another driver that allows the boot process to read that
data.
Hope this helps,
-Andi
next prev parent reply other threads:[~2006-04-09 15:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5ZjEd-4ym-37@gated-at.bofh.it>
[not found] ` <5ZlZk-7VF-13@gated-at.bofh.it>
2006-04-08 14:05 ` Black box flight recorder for Linux Robert Hancock
2006-04-08 7:17 ` Andi Kleen
2006-04-08 16:28 ` James Courtier-Dutton
2006-04-08 22:28 ` JustFillBug
2006-04-09 17:09 ` James Courtier-Dutton
2006-04-10 18:53 ` Ville Herva
2006-04-09 15:04 ` Andi Kleen [this message]
2006-04-09 19:25 ` Eric W. Biederman
2006-04-10 12:18 ` linux-os (Dick Johnson)
2006-04-10 19:44 ` Krzysztof Halasa
2006-04-10 20:07 ` linux-os (Dick Johnson)
2006-04-08 22:45 linux
-- strict thread matches above, loose matches on Subject: below --
2006-04-08 11:12 James Courtier-Dutton
2006-04-08 13:41 ` Andi Kleen
2006-04-08 19:42 ` Guennadi Liakhovetski
2006-04-08 16:40 ` Lee Revell
2006-04-08 17:30 ` Matti Aarnio
2006-04-09 19:23 ` Krzysztof Halasa
2006-04-10 12:01 ` Andy Green
2006-04-10 19:24 ` Krzysztof Halasa
2006-04-19 10:47 ` Krzysztof Halasa
2006-06-06 17:42 ` Krzysztof Halasa
2006-06-07 8:03 ` Jean Delvare
2006-06-07 10:18 ` Andy Green
2006-06-07 23:52 ` Krzysztof Halasa
2006-04-11 11:21 ` Jan Engelhardt
2006-04-10 3:06 ` Russell Senior
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=200604091704.47566.ak@suse.de \
--to=ak@suse.de \
--cc=James@superbug.co.uk \
--cc=hancockr@shaw.ca \
--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