pub struct PipeBufferSource {
pub config: PipeBufferConfig,
}Expand description
Harvests timing jitter from pipe I/O with multiple pipes competing for kernel buffer space.
§What it measures
Nanosecond timing of write() + read() cycles on a pool of pipes,
with variable write sizes and periodic pipe creation/destruction for
zone allocator churn.
§Why it’s entropic
Multiple simultaneous pipes competing for kernel zone allocator resources amplifies nondeterminism:
- Zone allocator contention — multiple pipes allocating from the pipe zone simultaneously creates cross-CPU magazine transfer contention
- Variable buffer sizes — different write sizes exercise different mbuf allocation paths (small = inline storage, large = chained mbufs)
- Non-blocking I/O —
EAGAINon full pipe buffers follows a different kernel path with its own latency characteristics - Cross-pipe interference — reading from one pipe while another has pending data creates wakeup scheduling interference
§What makes it unique
Pipe buffers exercise the kernel’s zone allocator (magazine layer) in a way that no other entropy source does. The zone allocator’s per-CPU caching and cross-CPU transfers create timing that depends on every CPU’s allocation history.
§Configuration
See PipeBufferConfig for tunable parameters. Key options:
non_blocking: capture EAGAIN failure path timing (recommended:true)num_pipes: controls zone allocator contention levelmin_write_size/max_write_size: controls mbuf allocation path diversity
Fields§
§config: PipeBufferConfigSource configuration. Use Default::default() for recommended settings.
Trait Implementations§
Source§impl Default for PipeBufferSource
impl Default for PipeBufferSource
Source§fn default() -> PipeBufferSource
fn default() -> PipeBufferSource
Returns the “default value” for a type. Read more
Source§impl EntropySource for PipeBufferSource
impl EntropySource for PipeBufferSource
Auto Trait Implementations§
impl Freeze for PipeBufferSource
impl RefUnwindSafe for PipeBufferSource
impl Send for PipeBufferSource
impl Sync for PipeBufferSource
impl Unpin for PipeBufferSource
impl UnwindSafe for PipeBufferSource
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