Subject: Re: pmap(9) tweak
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 08/10/2002 15:13:24
On Sat, Aug 10, 2002 at 11:42:45AM -0700, Jason R Thorpe wrote:
> On Sat, Aug 10, 2002 at 01:39:16PM -0400, Bill Sommerfeld wrote:
> 
>  > > I'd like to specify that exec mappings are not allowed to be entered
>  > > via pmap_kenter_pa() (at least, not by machine-independent code).  I'm
>  > > pretty sure no MI code does this as it stands.
>  > 
>  > What's the motivation/rationale for this restriction?  
> 
> Some systems don't have unused bits in the PTE to track exec permission,
> and thus have to keep the info somewhere else (e.g. in a PV entry), which
> aren't available to pmap_kenter_pa().  The goal is to avoid unnecessary
> I-cache frobbing.

this seems reasonable to me.  uvm_km_kmemalloc() violates this currently,
but removing the exec bit from that should be fine.  the only context where
that the exec bit should matter in the kernel (besides the text segment)
is for LKMs, but the memory to hold LKMs is allocated with uvm_km_alloc()
which uses pmap_enter(), so that should be ok.

-Chuck