From: Ben Gras Date: Mon, 19 Jul 2010 18:19:16 +0000 (+0000) Subject: vm: allow readonly pages when sanity checking when they're supposed to be rw. X-Git-Tag: v3.1.8~191 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/invmod.png?a=commitdiff_plain;h=5e2c84b1194d601f69c64cfa92160f1e7ee49a8d;p=minix.git vm: allow readonly pages when sanity checking when they're supposed to be rw. --- diff --git a/servers/vm/arch/i386/pagetable.c b/servers/vm/arch/i386/pagetable.c index ca7f37daa..8b8a4c426 100644 --- a/servers/vm/arch/i386/pagetable.c +++ b/servers/vm/arch/i386/pagetable.c @@ -581,6 +581,10 @@ PUBLIC int pt_writemap(pt_t *pt, vir_bytes v, phys_bytes physaddr, maskedentry = pt->pt_pt[pde][pte]; maskedentry &= ~(I386_VM_ACC|I386_VM_DIRTY); /* Verify pagetable entry. */ + if(entry & I386_VM_WRITE) { + /* If we expect a writable page, allow a readonly page. */ + maskedentry |= I386_VM_WRITE; + } if(maskedentry != entry) { printf("pt_writemap: mismatch: "); if((entry & I386_VM_ADDR_MASK) !=