feat(arje-incarnate): A5 — pivot_root + OverlayFS
Dos ChildPreExec nuevos en el hook declarativo pre-execve:
- MountOverlay { target, options } — monta OverlayFS (capa base RO +
capa de sesión RW + workdir).
- PivotRoot { new_root, put_old, old_root_after } — bind-mount de
new_root sobre sí mismo + pivot_root + chdir("/") + umount2 lazy
(MNT_DETACH) del root viejo.
Builders ergonómicos en ChildSetup:
- with_overlay(lower, upper, work, merged)
- with_pivot_root(new_root, put_old_name)
Ambas ops corren en el hijo post-clone, dentro del mount namespace,
async-signal-safe (solo libc, sin allocator). Las consumirán mirada
(compositor Wayland) y matilda Ghost para rootfs aislados.
19 tests arje-incarnate verdes (3 nuevos: builders overlay/pivot).
cargo check --workspace verde. Pendiente: integration test en entorno
con namespaces reales.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,9 @@ pub enum IncarnateError {
|
||||
|
||||
#[error("invalid argv: contains NUL byte")]
|
||||
InvalidArgv,
|
||||
|
||||
#[error("rootfs path contains NUL byte (pivot_root / overlayfs)")]
|
||||
InvalidRootfsPath,
|
||||
}
|
||||
|
||||
/// Cuando `strict_caps = false`, errores no-fatales se reportan como
|
||||
|
||||
Reference in New Issue
Block a user