mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:12:08 +00:00
Kernel: Allow mmap() with PROT_WRITE+MAP_SHARED
Now that we have a way to flush changes back to disk, let's allow this type of mapping.
This commit is contained in:
parent
32aa37d5dc
commit
af6358e1e1
1 changed files with 0 additions and 5 deletions
|
@ -83,11 +83,6 @@ ErrorOr<void> InodeFile::ioctl(OpenFileDescription& description, unsigned reques
|
||||||
|
|
||||||
ErrorOr<Memory::Region*> InodeFile::mmap(Process& process, OpenFileDescription& description, Memory::VirtualRange const& range, u64 offset, int prot, bool shared)
|
ErrorOr<Memory::Region*> InodeFile::mmap(Process& process, OpenFileDescription& description, Memory::VirtualRange const& range, u64 offset, int prot, bool shared)
|
||||||
{
|
{
|
||||||
// FIXME: Support writing changes made to shared file mappings back to disk.
|
|
||||||
// Some ports behave incorrectly if we silently discard writes to memory-mapped files, so let's not lie about what we can do.
|
|
||||||
if (shared && (prot & PROT_WRITE))
|
|
||||||
return ENOTSUP;
|
|
||||||
|
|
||||||
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
|
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
|
||||||
RefPtr<Memory::InodeVMObject> vmobject;
|
RefPtr<Memory::InodeVMObject> vmobject;
|
||||||
if (shared)
|
if (shared)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue