1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:25:08 +00:00

Kernel: sys$mprotect protects sub-regions as well as whole ones

Split a region into two/three if the desired mprotect range is a strict
subset of an existing region. We can then set the access bits on a new
region that is just our desired range and add both the new
desired subregion and the leftovers back to our page tables.
This commit is contained in:
Andrew Kaster 2019-12-30 15:11:25 -05:00 committed by Andreas Kling
parent 9b516e3fb4
commit bc50a10cc9
2 changed files with 73 additions and 26 deletions

View file

@ -292,6 +292,7 @@ public:
bool deallocate_region(Region& region);
Region& allocate_split_region(const Region& source_region, const Range&, size_t offset_in_vmobject);
Vector<Region*, 2> split_region_around_range(const Region& source_region, const Range&);
void set_being_inspected(bool b) { m_being_inspected = b; }
bool is_being_inspected() const { return m_being_inspected; }