Skip to content

Commit

Permalink
Fix doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Sep 18, 2019
1 parent 5b48fde commit 27ab3e4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/SECURITY_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,6 @@ TODO: Write our threat models. Will require careful planning.

[Boot Configuration Table (BCT)]: https://switchbrew.org/wiki/BCT
[Package1]: https://switchbrew.org/wiki/Package1
[Package2]: https://switchbrew.org/wiki/Package2
[switchbrew wiki]: https://switchbrew.org/
[NPDM]: http://switchbrew.org/index.php?title=NPDM
2 changes: 2 additions & 0 deletions docs/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![feature(external_doc)]
#![deny(intra_doc_link_resolution_failure)]

#![doc(include = "../README.md")]

fn main() {}
Expand Down
6 changes: 4 additions & 2 deletions kernel/src/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ pub fn set_thread_area(segment_base_address: usize) -> Result<(), UserspaceError
/// 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.
/// [`process_permission_change_allowed`] state.
///
/// # Errors
///
Expand All @@ -693,8 +693,10 @@ pub fn set_thread_area(segment_base_address: usize) -> Result<(), UserspaceError
/// - `InvalidMemState`
/// - Supplied memory range is not contained within the target process
/// address space.
/// - Supplied memory range does not have the [process_permission_change_allowed]
/// - Supplied memory range does not have the [`process_permission_change_allowed`]
/// state.
///
/// [`process_permission_change_allowed`]: sunrise_libkern::MemoryState::PROCESS_PERMISSION_CHANGE_ALLOWED
pub fn set_process_memory_permission(proc_hnd: u32, addr: usize, size: usize, perms: u32) -> Result<(), UserspaceError> {
let addr = VirtualAddress(addr);

Expand Down
8 changes: 5 additions & 3 deletions libuser/src/syscalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
/// 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.
/// [`process_permission_change_allowed`] state.
///
/// # Errors
///
Expand All @@ -544,8 +544,10 @@ pub unsafe fn set_thread_area(address: usize) -> Result<(), KernelError> {
/// - `InvalidMemState`
/// - Supplied memory range is not contained within the target process
/// address space.
/// - Supplied memory range does not have the [process_permission_change_allowed]
/// - Supplied memory range does not have the [`process_permission_change_allowed`]
/// state.
///
/// [`process_permission_change_allowed`]: sunrise_libkern::MemoryState::PROCESS_PERMISSION_CHANGE_ALLOWED
pub fn set_process_memory_permission(proc_hnd: &Process, addr: usize, size: usize, perms: MemoryPermissions) -> Result<(), KernelError> {
unsafe {
syscall(nr::SetProcessMemoryPermission, (proc_hnd.0).0.get() as _, addr, size, perms.bits() as _, 0, 0)?;
Expand All @@ -555,7 +557,7 @@ pub fn set_process_memory_permission(proc_hnd: &Process, addr: usize, size: usiz

/// Maps the given src memory range from a remote process into the current
/// process as RW-. This is used by the Loader to load binaries into the memory
/// region allocated by the kernel in [create_process()].
/// region allocated by the kernel in [`create_process`](create_process).
///
/// The src region should have the MAP_PROCESS state, which is only available on
/// CodeStatic/CodeMutable and ModuleCodeStatic/ModuleCodeMutable.
Expand Down
7 changes: 4 additions & 3 deletions libuser/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,10 @@ impl Process {
/// resource limit and memory pool.
///
/// The entrypoint is assumed to be the first address of the `code_addr` region
/// provided in [create_process()]. It takes two parameters: the first is the
/// usermode exception handling context, and should always be NULL. The second
/// is a handle to the main thread.
/// provided in [`create_process`](crate::syscalls::create_process()). It
/// takes two parameters: the first is the usermode exception handling
/// context, and should always be NULL. The second is a handle to the main
/// thread.
///
/// # Errors
///
Expand Down

0 comments on commit 27ab3e4

Please sign in to comment.