nvx-rs: check a GPT disk's kernel partitions in the guest
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with parent issue #621 and the guest GPT path in nvx::guest::gpt::read_disk; review reference implementation PR #715 on its branch for the proposed behavior. The work covers sysfs partition checks, conditional BLKRRPART rereads with deadline handling, consistent reads, returned block devices, and privileged microVM scenarios. Done means those cases are covered and kernel partitions are validated against the GPT table.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Deferred to: platform clones (meta B, to be filed), whose restore substitutes the distro under a running kernel. From: #621 (A3.3), which closes without it. Reference implementation: #715, not merged, on branch esaurez/a3-gpt-device-validation-20261020.
#621 specified that, after a partition-table reread, each kernel partition match its validated entry before a deadline. The first iteration of A3.3's device code leaves that out. nvx::guest::gpt::read_disk reads a GPT disk's table through the block device that the guest's kernel attached, at the device's logical block size and size, and checks it, with the expected disk GUID, through nvx::gpt. The guest then uses the partitions that the kernel created when it found the disk, such as /dev/vda2, without comparing them with the table or asking the kernel to reread it. For a disk that the host stages read-only and attaches when it creates the VM, the kernel reads the same table before the guest's init starts, and nothing changes it afterwards.
This issue tracks the rest, for when a guest needs it: for example, for a disk whose table can change under a running kernel, or for a guest whose disks other programs manage.
- Compare the kernel's partitions of the disk, as sysfs describes them (number, start and size), with the table's, and refuse missing and extra partitions.
- Reread the table (
BLKRRPART) only when they differ, then wait, with a deadline and short pauses, until they match, and refuse them when the deadline passes. The reread needsCAP_SYS_ADMIN, and fails while a partition of the disk is open. - Take a consistent view: never combine partitions, or the attributes of one partition, read before and after a reread.
- Return the partitions' block devices: the first partition's and the layers'.
- Privileged tests as a microVM scenario, with a test-only guest program shared into the guest rather than a larger release initramfs: a crafted GPT disk; missing, extra, moved and late partitions; and an MBR that the kernel reads in place of the table.
#715 implemented all of this, and passed CI and its reviews. Built as optimized as the guest binaries, its validation of a read-only disk, as the kernel found it at boot, took 0.4 to 0.9 ms on WHP and MSHV; the reread that it skipped there took 0.6 to 1.4 ms.
- Lenguaje dominante
- Python
- Estrellas
- 408
- Forks
- 28
- Merge medio
- 16 h 20 min
- PR fusionados (30 d)
- 355
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/nvx
-
Track nvx-rs host VMM supervisor bugs: a non-UTF-8 process name at a reused PID blocks reconcile, reattach, and stopPosiblemente ocupada @56steve la tomó hace 2 días. Abiertobug-hunt confirmed good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/nvx#720 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 24/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/nvx
Issues similares
-
Project submission:Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#845 ·
Los mantenedores suelen responder en 1 día
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodifficulty:2 enhancement good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
MakazhanAlpamys/Soup#2178 ·
Los mantenedores suelen responder en 1 día
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
scverse/rapids-singlecell#854 ·
Los mantenedores suelen responder en 1 día
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPosiblemente ocupada @ninglinLiu la tomó hoy. Abiertoarea:frontend backend:slang bug direction:input
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 13 días