code wiki / _hdl_build / _driver_exceed_gate.nx

_driver_exceed_gate.nx

buildroot/runtime/_hdl_build/_driver_exceed_gate.nx

14951 B284 linesdepth 8pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic driver
docsdependenciesstructsconstsfunctions

about

_driver_exceed_gate.nx -- gate for DRIVER-EXCEEDS-LINUX (X-DRV-W3). Enforces NO-OVERCLAIM. (1) AUTHORED -- runs the REAL nx_driver_exceed; it must exit GREEN (>=1 measured win, no blob). (2) NO-OVERCLAIM (the core W3 discipline) -- the throughput-blockio + latency-per-io rows MUST be OPEN, never WIN (we have no common substrate with a real Linux driver, so a perf "win" would be a wave). POSITIVE control: the real panel's perf rows carry no WIN. NEGATIVE control: a synthetic panel that marks a perf row WIN MUST be caught as an overclaim (proves the check bites -- it is not a rubber stamp). (3) MEASURED-WIN RE-DERIVE -- at least one WIN, and its basis re-derives from the artifact: the minimal-standalone-tcb value equals the ACTUAL stat of _drv_proto_blk.bin (re-measured here), and the retarget basis (bound_working=2) is present in driver_bind.log. A win not backed by a re-derivable artifact value is rejected. NATIVE-STORE MIGRATION (operator directive 2026-06-20 "stop using tsv, nishi ecosystem only"): the panel is no longer parsed from a flat .tsv. This gate is SELF-CONTAINED -- it MEASURES the same real artifacts the organ measures (re-stat _drv_proto_blk.bin = standalone-tcb bytes, re-confirm bound_working=2 in driver_bind.log), SEEDS those measured rows into a fresh content-addressed seg_store under /tmp, and runs every check by reading that NATIVE store via nx_native_config (ncfg). The negative control seeds a SEPARATE tampered store (a perf-WIN) and proves the same check flags it. No TSV, no SQL -- nishi ecosystem only. Evidence -> knowledge/status/driver_exceed.log (DRVEXCEEDGATE row). Sovereign. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_native_config.nx _driver_exceed_gate.nx

imports: nx_syscalls.nxnx_native_config.nx

imported by: nobody (leaf or entry point)

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

main g_p sys_write sys_openat_append g_run sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ g_read sys_openat_rd sys_read sys_close g_hasz g_has g_strlen g_itoa sys_mmap ↻ g_fresh_prefix sys_now_ms sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻ g_seed_real ncfg_begin ss_begin ss_begin_cap sys_mmap ↻ g_panel_row sys_mmap ↻ ncfg_add_row sys_mmap ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32

structs

none

consts

26const GX_ORGAN: *u8 = "_offc/nx_driver_exceed.elf"
27const GX_BLK: *u8 = "runtime/_hdl_build/_drv_proto_blk.bin"
28const GX_BIND: *u8 = "knowledge/status/driver_bind.log"

functions

30func g_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
31func g_fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
32func g_fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
34func g_run(prog: *u8, outpath: *u8) -> i64
52func g_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
62func g_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: g_haszg_strstrmain
63func g_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
65func g_has(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64
called by 2: g_haszg_strstr
76func g_hasz(buf: *u8, n: i64, pat: *u8) -> i64 { return g_has(buf, n, pat, g_strlen(pat)) }
called by 1: main calls 2: g_hasg_strlen
79func g_strstr(hay: *u8, pat: *u8) -> i64
called by 1: main calls 2: g_hasg_strlen
84func g_itoa(v: i64, out: *u8) -> i64
called by 1: main calls 1: sys_mmap
94func g_fresh_prefix(out: *u8, base: *u8) -> i64
called by 1: main calls 2: sys_now_mssys_mmap
110func g_panel_row(w: *i64, idx: i64, axis: *u8, nishi: *u8, incumbent: *u8, verdict: *u8, evidence: *u8) -> i64
123func g_seed_real(prefix: *u8, tcb_nishi: *u8, retarget: i64) -> i64
137func g_seed_tamper(prefix: *u8) -> i64
146func g_field_of_axis(h: *i64, want: *u8, field: *u8, out: *u8) -> i64
170func g_axis_verdict_is_win(h: *i64, want: *u8) -> i64
called by 1: main calls 3: sys_mmapg_field_of_axisg_streq
178func g_any_win(h: *i64) -> i64
194func main() -> i64