Skip to main content

Module random

Module random 

Source
Expand description

Shared guest random-state and memory operations, independent of a backend. These synchronous operations preserve draws even when a later write fails.

Structs§

InitialImage
Identity of the sole initial image whose real auxv was already written. Backends must authenticate this identity before constructing a handoff.
RandomCopyFailure
A user-access random copy failed for a reason other than a guest fault.

Enums§

LoaderState
Authenticated loader result. Continuations carry no random state and must leave the ordinary newly constructed thread completely unchanged.

Constants§

MAX_INITIAL_STATE_BYTES
Fixed maximum for the backend-independent initial random-state handoff.

Functions§

decode_loader_state
Decode an exact canonical, configuration- and image-bound loader result. The backend must obtain these bytes only from its authenticated callback.
encode_continuation
Encode a supervisor-authenticated legacy path without transferring RNG, clock, metadata or any auxiliary-vector completion fact.
encode_initial_state
Encode only the actual PRNG and completed auxv identity. No clock, metadata, chaos RNG, scheduler state or request history is transferred.
fill_bytes
Fill guest memory from the same stream/chunk/write algorithm used by the normal Detcore handler. No syscall/scheduler accounting is performed here.
getrandom
Apply getrandom’s existing flag, length, null-buffer and fill semantics.
initialize_auxv
Draw and write the actual initial auxv bytes. A write failure preserves the consumed PRNG state, as in the normal post-exec callback.
root_prng
Construct the root guest stream from its configured seed, without creating a thread or discovering any process metadata.