Re: The well-factored 386

From: Helge Hafting (helgehaf@aitel.hist.no)
Date: Wed Jul 30 2003 - 02:11:31 EST


On Tue, Jul 29, 2003 at 05:19:51PM +0100, Jamie Lokier wrote:
> Helge Hafting wrote:
> > > The one thing that made it on-topic for me was his quiet suggestion
> > > that "forreal" mode interrupts are faster, and that it might, perhaps,
> > > be possible to modify a Linux kernel to run in that mode - to take
> > > advantage of the faster interrupts.
> >
> > That would have to be a kernel for very special use. The "forreal"
> > mode has protection turned off. As far as I know, that
> > means any user process can take over the cpu as if
> > it was running in kernel mode.
>
> There are quite a few embedded systems where that is ok, especially if
> performance is improved.
>
> Also, I am not sure whether paging still works in "forreal" mode. If
> it does, kernel memory could still be protected. Not well enough for
> security, but enough to protect against programming errors.
>
Paging works even in real mode, afaik. 386es used to emulate
"expanded" memory (a simple bank-switching thing for 286)
by going into protected mode, change the page tables, then
return to real mode with paging still enabled.

So you can probably use paging in "forreal" mode too. I believe
you only get the page table's memory mapping capabilities
though, I don't think you get protection of "kernel" pages
without protection enabled.

You could still "hide" kernel memory by giving userspace another
page table, but that means page table switching on each
syscall which kills performance worse than interrupt handling
in protecxted mode.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:44 EST