nx_tool_exec_allow_gate.nx
buildroot/runtime/nx_tool_exec_allow_gate.nx
about
nx_tool_exec_allow_gate.nx -- GATE for R1 (nx_tool_exec_allow), composing R0 (nx_tool_run). Proves the
execution allowlist is fail-closed and never-brick: only an allowlisted, gate-GREEN row resolves to an ELF
path and runs; a non-GREEN row is present-but-blocked; an unknown name and a traversal name ("../x") both
refuse; and a GREEN row actually EXECUTES its ELF and captures real stdout. Target = the canonical no-op
nx_tool_ping (a SEPARATE tiny ELF, zero recursion risk). Writes its allowlist to /tmp (never touches a
real config). PREREQ: build nx_tool_ping FIRST (produces _offc/nx_tool_ping.elf).
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_tool_exec_allow.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
structs
| none |
consts
| 11 | const TEA_TESTCONF: *u8 = "/tmp/nx_tea_test.conf" as *u8 |
functions
| 13 | func ew(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 |
| 14 | func en(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;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(1,bb,k); return 0 } called by 1: main |
| 15 | func e_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 } called by 1: main |
| 16 | func e_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: tea_write_testconf |
| 19 | func tea_write_testconf() -> i64 |
| 28 | func main() -> i64 |