1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:07:36 +00:00

UserspaceEmulator: Honor the read/write/execute bits in mmap regions

UE will now correctly crash when accessing an mmap memory region in
some way it's not supposed to be accessed.
This commit is contained in:
Andreas Kling 2020-11-14 15:13:50 +01:00
parent ef9ac8a8a2
commit d4509647d8
5 changed files with 72 additions and 5 deletions

View file

@ -69,6 +69,10 @@ public:
bool is_text() const { return m_text; }
void set_text(bool b) { m_text = b; }
virtual bool is_readable() const { return true; }
virtual bool is_writable() const { return true; }
virtual bool is_executable() const { return true; }
protected:
Region(u32 base, u32 size)
: m_base(base)