pub enum Step {
PluginInternal {
pid: PluginId,
pi: PluginInternal,
},
HostCall {
hc: HostCall,
auth: Authorized,
result: HostResult,
},
KernelInternal {
op: KernelOp,
},
MemFree {
caller: PluginId,
addr: MemAddr,
},
CapRevoke {
caller: PluginId,
cap_id: CapId,
},
}Expand description
Step represents a single state transition in the Lion microkernel.
Variants§
PluginInternal
Plugin-internal computation (untrusted, sandboxed)
Fields
pi: PluginInternalThe internal computation descriptor
HostCall
Host call (trust boundary, mediated)
Fields
auth: AuthorizedAuthorization witness (validated at execution)
result: HostResultResult of host call execution
KernelInternal
Kernel-internal operation (trusted TCB)
MemFree
Direct memory free operation (refinement bridge)
CapRevoke
Direct capability revoke operation (refinement bridge)
Implementations§
Source§impl Step
impl Step
Sourcepub fn host_call_atomic(
state: &State,
hc: HostCall,
cap_id: CapId,
ctx: PolicyContext,
result: HostResult,
) -> Result<Self, StepError>
pub fn host_call_atomic( state: &State, hc: HostCall, cap_id: CapId, ctx: PolicyContext, result: HostResult, ) -> Result<Self, StepError>
Create a host call step with ATOMIC authorization.
The action is derived from the HostCall via hc.required_action(),
binding authorization to the exact operation being performed.
This prevents the vulnerability where a valid Authorized token
for one action could be reused to execute a different HostCall.
Sourcepub fn is_effectful(&self) -> bool
pub fn is_effectful(&self) -> bool
Check if this step is effectful (crosses trust boundary).
Sourcepub fn subject(&self) -> Option<PluginId>
pub fn subject(&self) -> Option<PluginId>
Get the subject (executing plugin) of the step, if any.
Sourcepub fn level(&self, state: &State) -> SecurityLevel
pub fn level(&self, state: &State) -> SecurityLevel
Get the security level of the step.
Sourcepub fn is_declassify(&self) -> bool
pub fn is_declassify(&self) -> bool
Check if this is a declassify operation.