9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] off by one in the pc kaddr
@ 2011-03-18 10:31 Anthony Martin
  2011-03-18 14:25 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony Martin @ 2011-03-18 10:31 UTC (permalink / raw)


I've read through the MMU code more than
a few times and never noticed this.  Who
reads past tmpunmap anyways? ;)

  Anthony

diff -c /sys/src/9/pc/mmu.c /tmp/mmu.c
/sys/src/9/pc/mmu.c:934,940 - /tmp/mmu.c:934,940
  void*
  kaddr(ulong pa)
  {
- 	if(pa > (ulong)-KZERO)
+ 	if(pa >= (ulong)-KZERO)
  		panic("kaddr: pa=%#.8lux", pa);
  	return (void*)(pa+KZERO);
  }



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-18 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 10:31 [9fans] off by one in the pc kaddr Anthony Martin
2011-03-18 14:25 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).