From: "Richard B. Johnson" <root@chaos.analogic.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hartmut Zybell <u_zybell@yahoo.de>, linux-kernel@vger.kernel.org
Subject: Re: ld-Script needed OR (predicted) Architecture of Kernel 3.0 ;-)
Date: Wed, 15 Oct 2003 13:37:42 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.53.0310151319480.7576@chaos> (raw)
In-Reply-To: <m1u16aeaej.fsf@ebiederm.dsl.xmission.com>
On Wed, 15 Oct 2003, Eric W. Biederman wrote:
> "Richard B. Johnson" <root@chaos.analogic.com> writes:
> >
> > Also, we have a module loader and unloader that allows modules
> > to be inserted and removed from a running system. There are
> > even experimental systems that allow the whole kernel to be
> > changed without (apparent) re-booting.
>
> Any pointers. I have heard rumors but I have never seen an actual
> implementation. Even one that failed in a lot of cases.
>
> Eric
I heard rumors, too. Something going on, on source-forge, but
I haven't looked. I surmise that, if it works, it uses hooks
for the "suspend-to-disk" code that is also supposed to work
but I haven't ever seen either.
In principle, it should not be too hard to do on Intel.
(1) User-mode code opens a module and writes the new kernel
into kernel space using ordinary read or write module function
calls. The module kernel code saves the data in a temporary
kmalloc()ed buffer.
(2) User mode code kills everybody except itself and dismounts
all file-systems.
(3) User-mode code, via an ioctl() signals the module code
to restart.
(4) The kernel-mode code disables all interrupts, then writes
the saved data to a physical location, outside the normal kernel
space.
(5) The kernel-mode code then copies some code to low RAM where
there is a 1:1 virtual to physical translation below 1 megabyte.
It then jumps there. The code needs to be relocatable, not
a problem for the simple stuff it needs to do.
(6) Since the virtual:physical transation is 1:1, it can now
disable paging.
(7) With paging disabled, it copies the saved data from the
physical location used in (4) to offset 1 megabyte, the normal
relocation address.
(8) It jumps to the kernel startup code at the normal relocated
address.
FYI, I did something like this to non-distructively find the
physical address of bad RAM a few years ago. I made a module
that transitioned to 1:1 translation with paging disabled to
find the real bad RAM (the test program had written some tokens
to both sides of the failed area). It then transitioned back
to paged mode and, ultimately, back to user-mode code, with
the answer.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
prev parent reply other threads:[~2003-10-15 17:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 11:41 Hartmut Zybell
2003-10-14 12:32 ` Richard B. Johnson
2003-10-14 13:46 ` Hartmut Zybell
2003-10-14 17:27 ` Richard B. Johnson
2003-10-15 11:45 ` Hartmut Zybell
2003-10-15 16:24 ` Eric W. Biederman
2003-10-15 16:32 ` Valdis.Kletnieks
2003-10-15 17:37 ` Richard B. Johnson [this message]
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=Pine.LNX.4.53.0310151319480.7576@chaos \
--to=root@chaos.analogic.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=u_zybell@yahoo.de \
/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
all inboxes | Powered by JetHome®