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.
This commit is contained in:
Andreas Kling 2020-07-27 00:23:48 +02:00
parent 240eb3242a
commit 23082e528f
Notes: sideshowbarker 2024-07-19 04:35:27 +09:00

View File

@ -64,7 +64,6 @@ ssize_t InodeFile::write(FileDescription& description, size_t offset, const u8*
KResultOr<Region*> 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<InodeVMObject> vmobject;
if (shared)