Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pmap attempts at copying to executable pages both on mips and powerpc/booke



On 2016/09/28 20:40, Nick Hudson wrote:
The problem is here...

https://nxr.netbsd.org/xref/src/sys/uvm/pmap/pmap.c#1275

   1275     if (pte_valid_p(opte) && pte_to_paddr(opte) != pa) {
   1276         pmap_remove(pmap, va, va + NBPG);
   1277         PMAP_COUNT(user_mappings_changed);
   1278     }
   1279
   1280     KASSERT(pte_valid_p(npte));
   1281     const bool resident = pte_valid_p(opte);
   1282     if (resident) {
   1283         update_flags |= PMAP_TLB_NEED_IPI;
   1284     } else {
   1285         pmap->pm_stats.resident_count++;
   1286     }

if the mapping changes PA then the resident_count gets reduced by pmap_{,pte_}remove, but not increased again.

I'm working on a fix.

Thank you very much for your analysis. I'm looking forward to hearing
good news from you!

Rin


Home | Main Index | Thread Index | Old Index