Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ibm4xx pmap: execution permission for kernel mappings
This _should_ work. Alpha was handling this correctly
all the time, and I've just switched amd64 to do likewise.
There was a problem with LKMs, but this should be fixed too.
I can't test myself, but if someone is adventurous he could
try the appended patch.
best regards
Matthias
--- pmap.c.~1.40.~ Tue Jul 4 12:30:34 2006
+++ pmap.c Wed Jul 5 17:53:39 2006
@@ -912,16 +912,11 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v
/*
* Generate TTE.
- *
- * XXXX
- *
- * Since the kernel does not handle execution privileges properly,
- * we will handle read and execute permissions together.
*/
tte = 0;
if (prot & VM_PROT_ALL) {
- tte = TTE_PA(pa) | TTE_EX | TTE_ZONE(ZONE_PRIV);
+ tte = TTE_PA(pa) | TTE_ZONE(ZONE_PRIV);
/* XXXX -- need to support multiple page sizes. */
tte |= TTE_SZ_16K;
#ifdef DIAGNOSTIC
@@ -941,6 +936,8 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v
#endif
if (prot & VM_PROT_WRITE)
tte |= TTE_WR;
+ if (prot & VM_PROT_EXECUTE)
+ tte |= TTE_EX;
}
s = splvm();
Home |
Main Index |
Thread Index |
Old Index