@@ -533,7 +533,7 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
533
533
/// executable bit, nor is it acceptable to use write-only permissions.
534
534
///
535
535
/// This can only be used on memory regions with the
536
- /// [process_permission_change_allowed] state.
536
+ /// [` process_permission_change_allowed` ] state.
537
537
///
538
538
/// # Errors
539
539
///
@@ -544,8 +544,10 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
544
544
/// - `InvalidMemState`
545
545
/// - Supplied memory range is not contained within the target process
546
546
/// address space.
547
- /// - Supplied memory range does not have the [process_permission_change_allowed]
547
+ /// - Supplied memory range does not have the [` process_permission_change_allowed` ]
548
548
/// state.
549
+ ///
550
+ /// [`process_permission_change_allowed`]: sunrise_libkern::MemoryState::PROCESS_PERMISSION_CHANGE_ALLOWED
549
551
pub fn set_process_memory_permission ( proc_hnd : & Process , addr : usize , size : usize , perms : MemoryPermissions ) -> Result < ( ) , KernelError > {
550
552
unsafe {
551
553
syscall ( nr:: SetProcessMemoryPermission , ( proc_hnd. 0 ) . 0 . get ( ) as _ , addr, size, perms. bits ( ) as _ , 0 , 0 ) ?;
@@ -555,7 +557,7 @@ pub fn set_process_memory_permission(proc_hnd: &Process, addr: usize, size: usiz
555
557
556
558
/// Maps the given src memory range from a remote process into the current
557
559
/// process as RW-. This is used by the Loader to load binaries into the memory
558
- /// region allocated by the kernel in [create_process()] .
560
+ /// region allocated by the kernel in [` create_process`](create_process) .
559
561
///
560
562
/// The src region should have the MAP_PROCESS state, which is only available on
561
563
/// CodeStatic/CodeMutable and ModuleCodeStatic/ModuleCodeMutable.
0 commit comments