[−][src]Function sunrise_kernel::syscalls::set_process_memory_permission
pub fn set_process_memory_permission(
proc_hnd: u32,
addr: usize,
size: usize,
perms: u32
) -> Result<(), UserspaceError>
Change permission of a page-aligned memory region. Acceptable permissions are ---, r-- and rw-. In other words, it is not allowed to set the executable bit, nor is it acceptable to use write-only permissions.
This can only be used on memory regions with the
process_permission_change_allowed
state.
Errors
InvalidAddress
- Supplied address is not page-aligned.
InvalidSize
- Supplied size is zero or not page-aligned.
InvalidMemState
- Supplied memory range is not contained within the target process address space.
- Supplied memory range does not have the
process_permission_change_allowed
state.