*BSD News Article 17747


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!uunet!mcsun!sun4nl!eur.nl!pk
From: pk@cs.few.eur.nl (Paul Kranenburg)
Subject: Re: kernel writes to user space (was Re: Nethack)
Message-ID: <1993Jun30.201911.18489@cs.few.eur.nl>
Sender: news@cs.few.eur.nl
Reply-To: pk@cs.few.eur.nl
Organization: Erasmus University Rotterdam
References: <20bfrm$le7@pdq.coe.montana.edu> <C990xF.43n@sneaky.lonestar.org> <1993Jun29.181749.5833@fcom.cc.utah.edu> <20qqgu$dj@werple.apana.org.au> <1993Jun30.022629.24466@uvm.edu> <20rjmt$480@werple.apana.org.au>
Date: Wed, 30 Jun 1993 20:19:11 GMT
Lines: 23

In <20rjmt$480@werple.apana.org.au> andrew@werple.apana.org.au (Andrew Herbert) writes:

>wollman@trantor.emba.uvm.edu (Garrett Wollman) writes:

>>Isn't there a flag bit you can turn on on a *4*86, which tells the MMU
>>to behave in a sane manner?  If so, then perhaps someone ought to
>>write code to take advantage of this, triggered by defined(i486) &&

>Yep, the WP flag.  This is a Good Thing, but the i386 code needs quite a
>cleanup before it can be used.  Fixing things up to work with the 386 first
>is probably a more incremental (and thus less painful :) approach, given
>that the 386 needs to be supported anyway.

I found a hint at this flag in Bruce's interrupt handling changes. I tried
it out (set the bit during initialization in locore.s). It didn't work very
well. The kernel shoots itself in the foot when the first user-level process
starts. So far I've tracked it down to some stuff in pmap.c that sets up
the process page table, which gets called as a result of a trap from
user space probably right at the start the program when its page tables
are still marked as absent.

-pk