code wiki / (root) / nx_linux_guest_gate.nx

nx_linux_guest_gate.nx

buildroot/runtime/nx_linux_guest_gate.nx

10144 B248 linesdepth 7pulls 10 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_linux_guest_gate.nx -- F103c "Linux guest lane" (os lane, critical path; deps F103a=D F103b=D 2026-07-21). THE CLAIM: the Linux ABI exists in NishiOS ONLY as a LABELED interop GUEST LANE (contract C09, backend linux-host-syscalls) and that lane WORKS end-to-end as a real process substrate: guest spawn (fork+dup3+execve+wait4) with exit-code propagation, byte-exact stdout capture, stderr on the same capture, envp delivery, determinism -- while the NATIVE lane REFUSES Linux guests BY CONSTRUCTION (host paths unresolvable in the block-VFS; planted ELF bytes rejected by verify-before-execute with NO output fabricated). D001: emits the nx_gate_verdict contract. REFUTATION: argv[1]=negctl corrupts ONE byte of the expected stdout capture -> the byte-exact capture tooth (C03) MUST go RED alone; registered sibling nx_linux_guest_negtest pins that arg. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26): guests are user-space children.

dependencies 2 imports · 0 importers

nx_pabi.nx nx_gate_verdict.nx nx_linux_guest_gate.nx

imports: nx_pabi.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap gv_head gv_puts sys_write gv_puts ↻ lg_script lg_code lg_run pabi_spawn sys_fork sys_openat_wr sys_dup3 sys_execve sys_wait4 vb_resolve sys_mmap ↻ vb_lookup vb_ino vb_rd vb_nm_eq vb_read vb_ino ↻ vb_rd ↻ nxe_load_exec nxe_magic_ok nxe_integrity_ok nxe_r64 sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sha256_update sha256_final nxe_r64 ↻ nxe_may nxe_r64 ↻ nxe_mmap_rwx std_itoa

structs

none

consts

14const LG_BUF: i64 = 4096
15const LG_EXECN: i64 = 5

functions

18func lg_code(i: i64) -> i64
called by 1: main
26func lg_script(i: i64) -> *u8
called by 1: main
36func lg_run(script: *u8, outpath: *u8) -> i64
called by 1: main calls 1: pabi_spawn
52func lg_runx(prog: *u8, outpath: *u8) -> i64
called by 1: main calls 1: pabi_spawn
62func lg_cmp(got: *u8, gn: i64, want: *u8, wn: i64) -> i64
called by 1: main
72func lg_slen(s: *u8) -> i64
called by 1: main
79func lg_fold(ck: i64, buf: *u8, n: i64) -> i64
called by 1: main
87func main(argc: i64, argv: *i64) -> i64