We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fef4bd commit 91ca427Copy full SHA for 91ca427
src/memory/mmio.c
@@ -36,7 +36,7 @@ uintptr_t mmio(Thread *t, uintptr_t addr, off_t count, int flags) {
36
// only root can do this
37
if(p->user) return 0;
38
39
- off_t offset = addr & ~(PAGE_SIZE-1);
+ off_t offset = addr & (PAGE_SIZE-1);
40
size_t pageCount = (count + PAGE_SIZE - 1) / PAGE_SIZE;
41
if(addr & ~(PAGE_SIZE-1)) pageCount++;
42
0 commit comments