#[repr(C)]pub struct SpawnRequest {Show 24 fields
pub version: u32,
pub flags: u32,
pub image_ptr: u64,
pub image_len: u64,
pub name_ptr: u64,
pub name_len: u32,
pub core: u32,
pub memory_limit: u64,
pub privileges: u32,
pub hw_flags: u32,
pub mmio_base: u64,
pub mmio_len: u64,
pub dma_pages: u32,
pub bdf: u32,
pub irq_count: u32,
pub irqs: [u8; 4],
pub peers_ptr: u64,
pub peers_len: u32,
pub _pad: u32,
pub installs_ptr: u64,
pub installs_count: u32,
pub _pad2: u32,
pub probe_mode: u32,
pub _pad3: u32,
}Expand description
What a spawner tells the kernel about a task it wants started from an image IT supplies
(SpawnImage, syscall 52). Layout must match the kernel’s SpawnRequest exactly.
Shaped for the end state, not for what the kernel honours today: the hardware and privilege
fields are here because step D needs them, and a request that sets one is REFUSED loudly rather
than silently ignored (docs/service-ownership.md).
Fields§
§version: u32§flags: u32§image_ptr: u64§image_len: u64§name_ptr: u64§name_len: u32§core: u32§memory_limit: u64§privileges: u32§hw_flags: u32§mmio_base: u64§mmio_len: u64§dma_pages: u32§bdf: u32§irq_count: u32§irqs: [u8; 4]§peers_ptr: u64§peers_len: u32§_pad: u32§installs_ptr: u64Caller-provided caps to install into the child: [label_len][label][slot_lo][slot_hi]
repeated. The same encoding SpawnWithCaps uses - one wire format, not two.
installs_count: u32§_pad2: u32§probe_mode: u32Mode selector. Named for probes, its first user, but general: observe reads it to choose
one-shot / live / foreground, and takes the LIVE LOOP at 0.
_pad3: u32Implementations§
Source§impl SpawnRequest
impl SpawnRequest
Sourcepub fn new(image: &[u8], name: &str) -> Self
pub fn new(image: &[u8], name: &str) -> Self
A request with everything the kernel does not yet honour left at zero.
Sourcepub fn set_installs(
&mut self,
buf: &mut [u8],
pairs: &[(&str, CapHandle)],
) -> bool
pub fn set_installs( &mut self, buf: &mut [u8], pairs: &[(&str, CapHandle)], ) -> bool
Encode (label, cap) pairs into buf and point this request at them.
The caller must hold each cap WITH GRANT: the kernel checks it, and that check is what makes installing them non-escalating (7.3) - a caller that can GRANT a cap could transfer it anyway.
Trait Implementations§
Source§impl Clone for SpawnRequest
impl Clone for SpawnRequest
Source§fn clone(&self) -> SpawnRequest
fn clone(&self) -> SpawnRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more