git: 9front

Download patch

ref: 2437dab4023d9f8eb9f2a2f26c52b646d07bad01
parent: 9afdec41704fde1232e219ceb073eac9f43c1740
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 5 21:28:34 EDT 2020

pc: zero rampage() memory (thanks LordCreepity)

memory returned by rampage() is not zeroed, so we have to
zero it ourselfs. apparently, this bug didnt show up as we
where zeroing conventional low memory before the new memory
map code. also rampage() never returns nil.

--- a/sys/src/9/pc/mmu.c
+++ b/sys/src/9/pc/mmu.c
@@ -524,8 +524,7 @@
 			panic("mmuwalk2: va %luX entry %luX", va, *table);
 		if(!(*table & PTEVALID)){
 			map = rampage();
-			if(map == nil)
-				panic("mmuwalk: page alloc failed");
+			memset(map, 0, BY2PG);
 			*table = PADDR(map)|PTEWRITE|PTEVALID;
 		}
 		table = KADDR(PPN(*table));
--