|
ginnOS
The reference: libc, the libraries and the kernel
|
Go to the source code of this file.
Functions | |
| kerr_t | mm_unmap (process_t *proc, uintptr_t start, uintptr_t end) |
| changing a process's user mappings: unmap and protect ranges, keeping the process's areas (vma.h) and its page tables in step. | |
| kerr_t | mm_protect (process_t *proc, uintptr_t start, uintptr_t end, uint32_t prot) |
| change the protection of [start, end) in a process. | |
changing a process's user mappings: unmap and protect ranges, keeping the process's areas (vma.h) and its page tables in step.
unmap [start, end) from a process: every mapped page is removed (frames from RAM are freed; device frames are not) and the areas are trimmed. unmapped parts of the range are not an error.
| proc | the process. |
| start | first byte (page-aligned, user space). |
| end | first byte past the range (page-aligned). |
change the protection of [start, end) in a process.
pages already backed get the new permissions now; the rest are backed with them on first touch. PROT_NONE keeps the pages but makes them inaccessible to user code.
| proc | the process. |
| start | first byte (page-aligned, user space). |
| end | first byte past the range (page-aligned). |
| prot | the new PROT_* bits. |