x86_64: boot Asterinas as a non-root guest, with isolation test tooling#350
Closed
sandst08much wants to merge 17 commits into
Closed
x86_64: boot Asterinas as a non-root guest, with isolation test tooling#350sandst08much wants to merge 17 commits into
sandst08much wants to merge 17 commits into
Conversation
60ef93b to
aca8adf
Compare
aca8adf to
0939172
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the ability to boot Asterinas as a non-root guest zone, and a
tooling suite to actually check hvisor's isolation guarantees hold when a
guest zone is buggy or hostile, rather than just assuming they do.
Guest support:
cpuid.rs/boot.rs: restructured CPUID/feature-flag handling;module_init()now supports multiple ordered boot modules (Asterinasships as several separate modules, unlike Linux's single-image boot).
ioapic.rs/pio.rs/trap.rs: non-root zones no longer get accessto the real i8042/legacy ports or unrestricted IRQ ownership — those
stay with zone 0.
Isolation tooling (
tools/secure-isolation/):zonelint— validates a zone config against the same invariants thezone-memory-validation PR (submitted separately) enforces at runtime, so
a bad config gets caught before you even try to boot it.
virtio-fuzzer— throws malformed VirtIO descriptors at a guest to checkthe host doesn't choke on them.
(a "victim" zone and an adjacent zone trying to reach into it).
scripts/reproduce.sh— an 8-check harness tying all of the abovetogether, plus a README and threat-model writeup describing exactly what
is being defended against, and what isn't.
Depends on four smaller fixes submitted separately (fault containment,
LA57 MMIO handling, zone memory validation, the clippy fixes) — this
feature's own tests exercise all four, so this PR isn't correct to merge
without them also landing.
Verification:
make ARCH=x86_64 BOARD=qemu MODE=release all,cargo fmt --all -- --check— clean.tools/secure-isolation/scripts/reproduce.sh: 8/8 passing (zonelint unittests, positive and negative zone-config validation, virtio-fuzzer unit
tests plus a dry-run pass, faultinj probe builds).