code wiki / (root) / nx_ownership_gate.nx

nx_ownership_gate.nx

buildroot/runtime/nx_ownership_gate.nx

15186 B229 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic ownership
docsdependenciesstructsconstsfunctions

about

nx_ownership_gate.nx -- GATE for LN4 ownership moves (own_check_move) and LN5 use-after-free (own_check_uaf). ONE gate for both rungs because there is ONE checker: a move and a release are the same event -- the name stops naming a live buffer -- and two gates over one state machine would be two rulers for one invariant. THE RUNGS' DONE-RULES: a use after `__move(p)` is a compile error naming the local; a use after `sys_munmap(p, n)` is a compile error naming the local; the existing corpus builds unchanged under the default mode. SUBJECT IS argv[1] AND THERE IS NO DEFAULT. A gate that forks a compiler it was not given measures whatever happens to be installed and prints a fully-formed verdict about it -- the sibling compiler gates default to the live builder, and that default is exactly how a stale binary earns a green. Refusing costs one argument and removes the whole failure class, so this gate exits 3 (UNKNOWN -- "I could not look", never an acquittal) rather than guess. THE BITE IS TWO REAL COMPILERS, not a synthesised mutant: GREEN on a challenger built from a tree carrying the rung, RED on _offc/nx_cc_sovereign.elf (the live builder, which has no --ownership). Data captures in /tmp/nxown/, RUNNABLES under _build/ -- the NAS mounts /tmp noexec, so a runnable staged there passes every compile tooth and fails every run tooth with no diagnostic at all. Usage: nx_ownership_gate <compiler_elf> (CWD = the tree root) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_ccgate_lib.nx nx_ccbuild_lib.nx nx_lineconf_lib.nx nx_ownership_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_ccgate_lib.nxnx_ccbuild_lib.nxnx_lineconf_lib.nx

imported by: nobody (leaf or entry point)

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

main ccg_anchor_root sys_openat_rd sys_close sys_chdir sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mmap ↻ lcf_str_of sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ lcf_str lcf_find gv_puts sys_write ↻ sys_exit ↻ sys_mkdir ccg_pid ccg_path sys_mmap ↻ gv_ctr

structs

none

consts

29const OWNG_USAGE_EXIT: i64 = 3
30const OWNG_CONF: *u8 = "knowledge/ownership_gate.conf\x00"

functions

32func main(argc: i64, argv: *i64) -> i64