Subject: Re: Analysis of kern/6891 (ps output) [Was Re: Semi fix for PR kern/6891]
To: None <dyson@iquest.net>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 02/01/1999 19:25:59
On Mon, 1 Feb 1999 22:02:41 -0500 (EST) 
 "John S. Dyson" <dyson@iquest.net> wrote:

 > Mapping /dev/(k)mem on machines without aliasing problems isn't a real
 > problem, because the user mappings will have the pv entries.  A modification
 > required to pmap_kremove (even in the FreeBSD codebase), would be to chase
 > down the pv entries.  That overhead would be needed only if there were any pv
 > entries, which would be an exceptional circumstance.

No, the issue here is:

Say you have a system (like the MIPS) which can have alias problems
between user and kernel mode (i.e. the cache has no notion of user vs.
supervisor mappings).

You pmap_kenter() a page in the kernel.

Now, you happen to mmap that same page with an aliasing virtual address.

The pmap_kenter() routine didn't add a pv entry.  Now you're screwed.

Granted, this _is_ an exceptional case, but it is a defficiency worth noting.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>