microVM: reconcile the 64-KiB command-line limit with the guest kernel's limit
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- infrastructure
Direzione di ricerca
Start with section 5.1.2 of the architecture guide in doc/design/, then the limit constant in openvmm/openvmm_defs/src/microvm.rs (around L38-39 and the check near L1453-1456) and the Linux direct loader at vm/loader/src/linux/microvm.rs L288. Also check kernel/config-microvm, kernel/patches/, and scripts/nvx_tools/sandbox.py L22-26. The issue leaves the fix open, so first settle which option to take with maintainers. Done means the guide states the guest limit, the chosen option is implemented, and a boot test confirms the last profile token reaches the guest.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Section 5.1.2 of the architecture guide in doc/design/ limits the complete NUL-terminated kernel command line to 64 KiB, and OpenVMM enforces exactly that limit. The NVX guest kernel parses less: x86 Linux's COMMAND_LINE_SIZE is 2,048 bytes, as scripts/nvx_tools/sandbox.py also assumes, and neither kernel/config-microvm nor kernel/patches/ changes it. The VMM cannot read the kernel's limit from the uncompressed ELF image either.
OpenVMM can therefore accept a command line between 2 KiB and 64 KiB that the guest kernel truncates, and it reports no error. The machine profile appends its own tokens last (device discovery, nvx_control_tty=hvc2, and the network and host filesystem bootstrap tokens), so they are the first to be lost. This contradicts the rule that invalid configurations are rejected, never silently adjusted (section 1.4.1).
This is a gap in the architecture guide rather than an implementation deviation. Found while auditing the implementation against the guide.
Where it applies
- OpenVMM, at the gitlink nanvix/openvmm@c6d97c5:
MICROVM_COMMAND_LINE_MAX_SIZEis 64 KiB, checked in the profile (for example at L1453-L1456) and in the Linux direct loader. - The NVX launchers guard themselves.
nvx.py sandboxreserves 1,024 of the kernel's 2,048 bytes for OpenVMM (sandbox.pyL22-L26), andnvx-rslimits caller tokens to 1,024 bytes (COMMAND_LINE_BUDGET). Callers of OpenVMM itself have no such guard.
Options
- State the guest kernel's limit in section 5.1.2, and have OpenVMM reject an effective command line that exceeds it.
- Raise the guest kernel's command-line size with a kernel patch, so that the 64-KiB contract holds end to end.
Tasks
- Choose an option and update section 5.1.2 of the architecture guide.
- Implement it in nanvix/openvmm, and promote the pin, or in
kernel/patches/. - Add a boot test with a command line near the limit that checks that the last machine-profile token reaches the guest.
- Lingua principale
- Python
- Stelle
- 380
- Fork
- 24
- Merge medio
- 12h 28m
- PR unite (30g)
- 294
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/nvx
-
bug-hunt confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
microVM: create requested workload accounts in the layered sandbox root, or stop advertising themAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/nvx
Issue simili
-
area:core-platform effort:S priority:P3 status:in-review type:test
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 80/100
randomparity/kdive#3246 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Requantification library converts m/z to mass with the hydrogen-atom mass instead of the proton massApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
nf-core/metaboigniter#130 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
common-workflow-language/cwl-utils#477 ·
I maintainer di solito rispondono entro 1 giorno
-
Add dependabotApertafeat
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
open-nudge/opentemplate#204 ·
I maintainer di solito rispondono entro 1 giorno
-
github-stale-ci-pr-closer: KV state is double-wrapped, never persists, and hits the depth-32 limitForse già presa @VascoSch92 l’ha presa oggi. Apertapriority:medium ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
OpenHands/extensions#781 ·
I maintainer di solito rispondono entro 1 giorno