Skip to content

Commit 27ab3e4

Browse files
committed
Fix doc links
1 parent 5b48fde commit 27ab3e4

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

docs/SECURITY_ARCHITECTURE.md

+1
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,6 @@ TODO: Write our threat models. Will require careful planning.
157157

158158
[Boot Configuration Table (BCT)]: https://switchbrew.org/wiki/BCT
159159
[Package1]: https://switchbrew.org/wiki/Package1
160+
[Package2]: https://switchbrew.org/wiki/Package2
160161
[switchbrew wiki]: https://switchbrew.org/
161162
[NPDM]: http://switchbrew.org/index.php?title=NPDM

docs/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![feature(external_doc)]
2+
#![deny(intra_doc_link_resolution_failure)]
3+
24
#![doc(include = "../README.md")]
35

46
fn main() {}

kernel/src/syscalls.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ pub fn set_thread_area(segment_base_address: usize) -> Result<(), UserspaceError
682682
/// executable bit, nor is it acceptable to use write-only permissions.
683683
///
684684
/// This can only be used on memory regions with the
685-
/// [process_permission_change_allowed] state.
685+
/// [`process_permission_change_allowed`] state.
686686
///
687687
/// # Errors
688688
///
@@ -693,8 +693,10 @@ pub fn set_thread_area(segment_base_address: usize) -> Result<(), UserspaceError
693693
/// - `InvalidMemState`
694694
/// - Supplied memory range is not contained within the target process
695695
/// address space.
696-
/// - Supplied memory range does not have the [process_permission_change_allowed]
696+
/// - Supplied memory range does not have the [`process_permission_change_allowed`]
697697
/// state.
698+
///
699+
/// [`process_permission_change_allowed`]: sunrise_libkern::MemoryState::PROCESS_PERMISSION_CHANGE_ALLOWED
698700
pub fn set_process_memory_permission(proc_hnd: u32, addr: usize, size: usize, perms: u32) -> Result<(), UserspaceError> {
699701
let addr = VirtualAddress(addr);
700702

libuser/src/syscalls.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
533533
/// executable bit, nor is it acceptable to use write-only permissions.
534534
///
535535
/// This can only be used on memory regions with the
536-
/// [process_permission_change_allowed] state.
536+
/// [`process_permission_change_allowed`] state.
537537
///
538538
/// # Errors
539539
///
@@ -544,8 +544,10 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
544544
/// - `InvalidMemState`
545545
/// - Supplied memory range is not contained within the target process
546546
/// 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`]
548548
/// state.
549+
///
550+
/// [`process_permission_change_allowed`]: sunrise_libkern::MemoryState::PROCESS_PERMISSION_CHANGE_ALLOWED
549551
pub fn set_process_memory_permission(proc_hnd: &Process, addr: usize, size: usize, perms: MemoryPermissions) -> Result<(), KernelError> {
550552
unsafe {
551553
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
555557

556558
/// Maps the given src memory range from a remote process into the current
557559
/// 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).
559561
///
560562
/// The src region should have the MAP_PROCESS state, which is only available on
561563
/// CodeStatic/CodeMutable and ModuleCodeStatic/ModuleCodeMutable.

libuser/src/types.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,10 @@ impl Process {
448448
/// resource limit and memory pool.
449449
///
450450
/// The entrypoint is assumed to be the first address of the `code_addr` region
451-
/// provided in [create_process()]. It takes two parameters: the first is the
452-
/// usermode exception handling context, and should always be NULL. The second
453-
/// is a handle to the main thread.
451+
/// provided in [`create_process`](crate::syscalls::create_process()). It
452+
/// takes two parameters: the first is the usermode exception handling
453+
/// context, and should always be NULL. The second is a handle to the main
454+
/// thread.
454455
///
455456
/// # Errors
456457
///

0 commit comments

Comments
 (0)