From c4e984ca492e7ee95b66281bf86c9c58b5cb5392 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 9 Feb 2019 08:44:46 +0100 Subject: [PATCH] Kernel: Allow mmap() with a size that's not a multiple of page size. We just round it up to the next multiple of page size anyway. --- Kernel/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e7840fc989..0b33f78221 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -162,7 +162,7 @@ void* Process::sys$mmap(const Syscall::SC_mmap_params* params) off_t offset = params->offset; if (size == 0) return (void*)-EINVAL; - if ((dword)addr & ~PAGE_MASK || size & ~PAGE_MASK) + if ((dword)addr & ~PAGE_MASK) return (void*)-EINVAL; if (flags & MAP_ANONYMOUS) { // FIXME: Implement mapping at a client-specified address. Most of the support is already in plcae.