The implicit requirement that va != 0 is too restrictive. it causes multiple panics, as soon as a nil is given to a system call when we should not give that thing. I changed it to return 0 when the address is nil. Notes: Fri Nov 18 11:30:22 EST 2005 rsc Sorry, I'd much rather fix the panics than break paddr. There is plenty of sketchy code, but returning 0 in this one case would allow things like PADDR(PADDR(KADDR(0))), which I'm trying to catch. If code assumes it can pass low addresses to PADDR, that code needs to be fixed. Where is it? Thanks. Russ Reference: /n/sources/patch/sorry/paddrfix Date: Thu Nov 17 13:32:19 CET 2005 Reviewed-by: rsc --- /sys/src/9/pc/mmu.c Thu Nov 17 13:31:25 2005 +++ /sys/src/9/pc/mmu.c Thu Nov 17 13:31:22 2005 @@ -893,8 +893,10 @@ paddr(void *v) { ulong va; - + va = (ulong)v; + if (va == 0) + return 0; if(va < KZERO) panic("paddr: va=%#.8lux", va); return va-KZERO;