Re: [lkcd-devel] Re: What's left over.

Eric W. Biederman
2002-11-10T18:09:59Z

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> On Sun, 2002-11-10 at 02:58, Eric W. Biederman wrote:
> > > What I'm trying to say is that I think the new kernel must
> > > already be loaded when the panic happens.
> > > Is that what you describe later (below)?
> >
> > Yes that was my meaning. The new kernel must be preloaded.
> > And only started on panic.
>
> Another question from the point of view of unifying things. What is
> wrong with
>
> insmod kexec
> creates /dev/kexec (or kexecfs is you are Al Viro)
> hooks the reboot and panic final notifiers
> user copies file to /dev/kexec (which stuffs it into ram)
>
> reboot
> kexec module handler jumps to the first page of the
> kexec data in a defined state assuming its PIC
>
>
> At which point we have clearly reduced kexec/oops reporter/lkcd/netdump
> to a single common tiny interface.

It would take a special hook that ran after the notifiers, and
device_shutdown. At least in the normal case running what shutdown
code we can is fairly important. And hooking the notifier lists
would not give a guarantee of going last.

There is a long ways to go in working with device drivers to even get
the easy kexec case working stably, in non-special circumstances.

The kernel gets there great but it does not cope well with the APICs
activated and the legacy pic disabled during bootup.

The additional device shutdown code is useful even in the normal
reboot path. Most BIOS's don't care but it should fix a few problems
with BIOS that are not as paranoid about the state of the system as
they should be when reboot is called. Little things like always
shutting down on the bootstrap cpu are on my todo list.

Eric