mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
Kernel: Teach Region how to remap itself
Now remapping (i.e flushing kernel metadata to the CPU page tables) is done by simply calling Region::remap().
This commit is contained in:
parent
3dce0f23f4
commit
4bf1a72d21
7 changed files with 15 additions and 19 deletions
|
@ -283,7 +283,7 @@ int Process::sys$mprotect(void* addr, size_t size, int prot)
|
|||
if (!region)
|
||||
return -EINVAL;
|
||||
region->set_writable(prot & PROT_WRITE);
|
||||
MM.remap_region(page_directory(), *region);
|
||||
region->remap();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -885,7 +885,7 @@ void create_signal_trampolines()
|
|||
memcpy(code_ptr, trampoline, trampoline_size);
|
||||
|
||||
trampoline_region->set_writable(false);
|
||||
MM.remap_region(*trampoline_region->page_directory(), *trampoline_region);
|
||||
trampoline_region->remap();
|
||||
}
|
||||
|
||||
int Process::sys$restore_signal_mask(u32 mask)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue