Expand description
Admission for intercepted CPU profiles: v3 binds qualified host XSTATE facts; host-no-rdrand requires CPUID faulting without the v3 qualification.
Every class the v3 startup qualification cannot cover is refused by name. Neither nondefault profile silently falls back to v2 or native CPUID.
Structs§
- Admission
Request - What the run asks for, as far as admission is concerned.
- CpuProfile
Refusal - A refused CPU profile, carried as an error so that it crosses the container boundary as a policy refusal (exit 122).
- Native
Cpuid - The CPUID instruction of the host this process runs on.
Constants§
- CPUID_
FAULTING_ VM_ SCRIPT - The source-tree script that loads a module turning on CPUID faulting in a KVM guest whose hypervisor offers it but whose pre-6.17 kernel probes it only on Intel vCPU models.
Traits§
- Host
Cpuid - A host CPUID reader, so tests can supply a host.
Functions§
- admit
- Admits a v3 run on this host, or names why not. On success the probe report and the host facts to bind are returned, and this process’s ptrace floating-point register writes are refused from then on. The request’s own refusals are checked every time; the host qualification runs once per process.
- admit_
host_ no_ rdrand - Select the lowest allowed CPU before the CLI’s container can randomly narrow affinity. Probe that CPU, restore the caller’s mask, and return the source to carry in Config::cpu_profile_source. The launch guard pins the actual tracer thread; this also works with a pre-existing library worker. Repeat runs require the same allowed CPU set and host configuration.
- check_
host_ cpuid - The host checks that need only CPUID, in the order they are checked:
every advertised v3 feature bit natively, OSXSAVE, not a hybrid part, and
not an AMD part without XSAVEERPTR (where Linux runs
fnclex; emms; fildlbefore every FPU restore, a path no host here can exercise). - check_
host_ no_ rdrand_ request - The host profile must intercept CPUID and TSC on ptrace. Unlike v3, it retains host XSAVE behavior and does not claim the XSTATE qualification.
- check_
kernel - Linux 5.16 is the first with the
ARCH_*_XCOMP_*queries the profile answers from the host; before it they return EINVAL. - check_
record_ or_ replay - A recording currently binds only the v3 host facts, not a complete native CPUID snapshot. Refuse host mode before writing metadata or launching a guest rather than accidentally treating it as v3.
- check_
request - The refusals that need no host probe, in the order they are checked.
- cpuid_
faulting_ vm_ pointer - A pointer to
CPUID_FAULTING_VM_SCRIPTwhenhostreports a hypervisor (CPUID leaf 1 ECX bit 31) andreleaseis older than Linux 6.17, the only hosts the module can help;Noneotherwise. - first_
difference - The first host fact in which
replaydiffers fromrecorded, by name, orNonewhen they are equal. - kernel_
version - Linux’s version as (major, minor), from a
uname -rrelease string. - missing_
cpuid_ faulting_ note - The note to print after an error whose chain reports missing CPUID faulting, on a host where the script may help, unless a message already carries the pointer.
- precheck_
replay - Refuses a v3 replay before the qualification probe runs when the recording carries no host facts, when this host differs in one of the facts it bound (the qualification itself aside), or when its CPUID table digest is not the one this replayer computes from them. The probe costs seconds of CPU, and a replay on a different CPU, or of an altered recording, needs none of it to be refused. Returns the recorded facts.
- qualify_
host - The host half of
admit, run once per process: the kernel, the every-bit CPUID check, the dynamic-feature refusal, the probe and the host facts.hermit host-capabilities --cpu-profile x86-64-v3runs it alone. - qualify_
host_ no_ rdrand - Probe the Linux CPUID-faulting API in a child. Disabling CPUID in the
tracer would also fault Rust’s and libc’s own feature detection, so only
the forked child changes its state. After fork the child uses only libc
syscalls and
_exit, without allocation, locks or unwinding. - record_
or_ replay_ request - The admission request of a recording or replay, which always runs on the ptrace backend with virtual CPUID.
- refuse_
unadmitted_ launch - Refuses a nondefault profile launch that this process did not admit.
Hermit’s library launch functions call this before any backend starts.
Host mode requires its faulting proof and interception options; v3 also
requires exactly the host facts
admitbound after qualification and its floating-point register write ban.
Type Aliases§
- Admission
Refusal - Why a profile is refused, after
--cpu-profile <profile> refused:. - Qualification
- What a host qualification yields: the XSTATE probe’s report and the host facts a v3 run binds.