From 23082e528f8d57742169baef43646f36ce6e3c88 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Jul 2020 00:23:48 +0200 Subject: [PATCH] Kernel: Support file-backed mmap() with non-zero offset As it turns out, this works just fine and all we had to do was remove the assertion! :^) Fixes #2597. --- Kernel/FileSystem/InodeFile.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp index a6968ce77f..6bbb9e5873 100644 --- a/Kernel/FileSystem/InodeFile.cpp +++ b/Kernel/FileSystem/InodeFile.cpp @@ -64,7 +64,6 @@ ssize_t InodeFile::write(FileDescription& description, size_t offset, const u8* KResultOr InodeFile::mmap(Process& process, FileDescription& description, VirtualAddress preferred_vaddr, size_t offset, size_t size, int prot, bool shared) { - ASSERT(offset == 0); // FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec. RefPtr vmobject; if (shared)