From: ality@pbrane.org (Anthony Martin)
Subject: [9fans] off by one in the pc kaddr
Date: Fri, 18 Mar 2011 03:31:31 -0700 [thread overview]
Message-ID: <20110318103131.GA9432@dinah> (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);
}
next reply other threads:[~2011-03-18 10:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 10:31 Anthony Martin [this message]
2011-03-18 14:25 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110318103131.GA9432@dinah \
--to=ality@pbrane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).