pub struct MachIPCSource {
pub config: MachIPCConfig,
}Expand description
Harvests timing jitter from Mach IPC using complex OOL messages.
§What it measures
Nanosecond timing of mach_msg() sends with out-of-line memory descriptors,
round-robined across a pool of Mach ports.
§Why it’s entropic
Complex Mach messages with OOL descriptors traverse deep kernel paths:
- OOL VM remapping —
vm_map_copyin/vm_map_copyoutexercises page tables, physical page allocation, and TLB updates - Port namespace contention — round-robin across ports exercises the splay tree with timing dependent on tree depth and rebalancing
- Per-port lock contention —
ipc_mqueue_sendacquires per-port locks - Receiver thread wakeup — cross-thread scheduling decisions affected by ALL runnable threads
§What makes it unique
Mach IPC is unique to XNU/macOS. Unlike higher-level IPC (pipes, sockets),
Mach messages go through XNU’s ipc_mqueue subsystem with entirely different
locking and scheduling paths. OOL descriptors add VM operations that no
other entropy source exercises.
§Configuration
See MachIPCConfig for tunable parameters. Key options:
use_complex_messages: OOL messages vs simple port ops (recommended:true)num_ports: controls namespace contention levelool_size: controls VM remapping workload per message
Fields§
§config: MachIPCConfigSource configuration. Use Default::default() for recommended settings.
Trait Implementations§
Source§impl Default for MachIPCSource
impl Default for MachIPCSource
Source§fn default() -> MachIPCSource
fn default() -> MachIPCSource
Returns the “default value” for a type. Read more
Source§impl EntropySource for MachIPCSource
impl EntropySource for MachIPCSource
Auto Trait Implementations§
impl Freeze for MachIPCSource
impl RefUnwindSafe for MachIPCSource
impl Send for MachIPCSource
impl Sync for MachIPCSource
impl Unpin for MachIPCSource
impl UnwindSafe for MachIPCSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more