Skip to main content

Module capability

Module capability 

Source
Expand description

Capability-based Security System

See also: Architecture Overview for the security model and data flow diagrams.

Implements a capability-based security model for Strat9-OS. All kernel resources are accessed through unforgeable tokens (capabilities).

Re-exportsยง

use crate::ipc; ๐Ÿ”’
use crate::ipc::MultiHandleResource; ๐Ÿ”’
use crate::process::TaskId; ๐Ÿ”’
use crate::sync::SpinLock; ๐Ÿ”’
use crate::vfs; ๐Ÿ”’
use alloc::collections::BTreeMap; ๐Ÿ”’
use alloc::vec::Vec; ๐Ÿ”’
use core::sync::atomic::AtomicU64; ๐Ÿ”’
use core::sync::atomic::AtomicUsize; ๐Ÿ”’
use core::sync::atomic::Ordering; ๐Ÿ”’
use spin::Once; ๐Ÿ”’

Structsยง

CapId
Unique identifier for a capability
CapPermissions
Permissions associated with a capability
Capability
A capability token that grants access to a kernel resource
CapabilityManager
Global capability manager
CapabilityTable
Table of capabilities for a process.
DmaRights
DMA rights carried by an IOMMU-related capability.
ResourceKey ๐Ÿ”’
Key for per-resource refcounting: (resource_type, resource_ptr)

Enumsยง

ResourceType
Types of kernel resources that can be accessed via capabilities

Staticsยง

CAPABILITY_MANAGER ๐Ÿ”’

Functionsยง

get_capability_manager
Get a reference to the global capability manager
release_capability
Releases a capability and cleans up the underlying resource.