public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Grant Grundler <iod00d@hp.com>
Cc: "Randy.Dunlap" <rddunlap@osdl.org>,
	linux-ia64@vger.kernel.org, fastboot@osdl.org,
	Jesse Barnes <jbarnes@engr.sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [Fastboot] Re: [BROKEN PATCH] kexec for ia64
Date: Thu, 05 Aug 2004 16:44:26 +0000	[thread overview]
Message-ID: <m14qnhilg5.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20040805153929.GC6526@cup.hp.com>

Grant Grundler <iod00d@hp.com> writes:

> On Wed, Aug 04, 2004 at 08:14:55PM -0600, Eric W. Biederman wrote:

> > In the general case it appears to be overkill, incorrect and
> > insufficient to disable bus mastering on all PCI devices.  Which is
> > why device_shutdown() calls device specific code.
> 
> Is anyone else considering using kexec() to recover from a oops/panic?

Yes.  That is what most of the recent discussion was about.  Considering
this was one of the subjects brought up at the kernel summit I'm surprised
a lot of people have been thinking that way.

> What is the risk calling multiple device_shutdown() will expose another panic?

It has been agreed that device_shutdown() will not be called in the panic
path.  What gets called on panic or other fatal case is going to be
a streamlined code path, that is little more than a jump to the
previously loaded kernel.  

> While calling a device specific cleanup is best, I worry about how
> much code/data gets touched in this path. I was hoping something
> simple like twiddling bus master bit would be sufficient.
> If it's not, oh well.

The kernel on the other side of the kexec gets to do this.  It will
run out of memory reserved for it in the kernel that panic'd since
boot time.

That is not perfect protection but it simple and quite good.
Especially with the addition of verifying a hash of the new kernel
before it messes with the hardware.  (But that code gets to live
in /sbin/kexec and added as a prefix to the recovery kernel)

I don't expect that is enough to give a full recovery but it
should be sufficient to take a core dump of the system or
do any number of other interesting things.  But before
running a full kernel it is expected that the entire system will
be reset, to get everything back into a sane state.

And of course all of this is largely architecture independent
so that the basic code should work on any architecture.

Eric

  reply	other threads:[~2004-08-05 16:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26 22:24 [BROKEN PATCH] kexec for ia64 Jesse Barnes
2004-07-26 22:36 ` Jesse Barnes
2004-07-26 23:09 ` David Mosberger
2004-07-26 23:30 ` David Mosberger
2004-07-26 23:34 ` Jesse Barnes
2004-07-26 23:42 ` David Mosberger
2004-07-27  8:24 ` Christian Hildner
2004-07-27 14:49 ` Jesse Barnes
2004-07-27 16:50 ` Luck, Tony
2004-07-30 22:55 ` Randy.Dunlap
2004-08-04 13:07   ` Eric W. Biederman
2004-08-04 16:24     ` Jesse Barnes
2004-08-04 23:33     ` Grant Grundler
2004-08-05  2:14       ` [Fastboot] " Eric W. Biederman
2004-08-05 15:39         ` Grant Grundler
2004-08-05 16:44           ` Eric W. Biederman [this message]
2004-08-05 19:44         ` Tolentino, Matthew E
2004-08-05 21:29           ` Eric W. Biederman
2004-08-05 22:15         ` Eric W. Biederman
2004-08-05 16:45 ` Luck, Tony
2004-08-05 17:05   ` [Fastboot] " Eric W. Biederman
2004-08-05 19:18     ` Khalid Aziz
2004-08-05 18:28 ` Grant Grundler
2004-08-05 18:56 ` Eric W. Biederman
2004-08-05 21:24 ` Grant Grundler

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=m14qnhilg5.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=fastboot@osdl.org \
    --cc=iod00d@hp.com \
    --cc=jbarnes@engr.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.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