nx_capture_owned_gate_expanded_t218.nx
buildroot/runtime/nx_capture_owned_gate_expanded_t218.nx
about
nx_tool_run.nx -- R0 of the EXECUTABLE-API rung: the sovereign exec+capture primitive the ecosystem
is missing. Today nishifamily.com/api/tools + /mcp only LIST tools (a read-only registry) and MCP
tools/call returns a SAFE STUB ("invoked X (capability-authorized)") -- there is NO way to actually
RUN an organ and hand back its real stdout. This organ is that missing capability, built hardware-up
from raw syscalls (fork/pipe/dup3/execve/wait4), reusing the EXACT proven wrappers from nx_hostctl's
hc_dfork_exec so it inherits the same never-brick discipline. NO /bin/sh, NO shell string, NO PATH
search -- callers pass an ABSOLUTE ELF path (the allowlist layer that maps tool-name -> path is R1,
nx_tool_registry). Synchronous (wait4), unlike hc_dfork_exec's detach -- because an API tools/call
needs the child's OUTPUT and EXIT CODE, not a fire-and-forget daemon.
license_tier: ORIGINAL
syscalls.nx -- thin __syscall wrappers used across modules.
Sovereign path: no libc. Every memory allocation, file op, and
clock read in the rest of the runtime routes through one of these
helpers. Numbers match Linux RV64; NishiOS uses the same set.
Extracted from runtime.nx and ir.nx's copy-pasted helpers so the
module-import build doesn't produce duplicate symbols.
dependencies 0 imports · 0 importers
imports: none
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 2268 | struct NxBufDyn |
| 2389 | struct NxBufOwned { buf:*u8, len:i64, cap:i64, } |
consts
| 223 | const NX_BUF_TINY: nx_size = 64 |
| 224 | const NX_BUF_SMALL: nx_size = 256 |
| 225 | const NX_BUF_MEDIUM: nx_size = 4096 |
| 226 | const NX_BUF_LARGE: nx_size = 65536 |
| 227 | const NX_BUF_HUGE: nx_size = 1048576 |
| 231 | const NX_TIER_MCU: nx_int = 0 |
| 232 | const NX_TIER_SOVEREIGN_CHIP: nx_int = 1 |
| 233 | const NX_TIER_FAMILY_DEVICE: nx_int = 2 |
| 234 | const NX_TIER_WORKSTATION: nx_int = 3 |
| 235 | const NX_TIER_SERVER: nx_int = 4 |
| 236 | const NX_TIER_HPC: nx_int = 5 |
| 240 | const NX_NUM_N0_I32: nx_int = 0 |
| 241 | const NX_NUM_N1_I64: nx_int = 1 |
| 242 | const NX_NUM_N2_I128: nx_int = 2 |
| 243 | const NX_NUM_N3_I256: nx_int = 3 |
| 244 | const NX_NUM_N4_I512: nx_int = 4 |
| 245 | const NX_NUM_N5_BIGINT: nx_int = 5 |
| 253 | const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes |
| 254 | const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width |
| 255 | const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size |
| 259 | const NX_FD_STDIN: nx_fd = 0 |
| 260 | const NX_FD_STDOUT: nx_fd = 1 |
| 261 | const NX_FD_STDERR: nx_fd = 2 |
| 263 | const SYS_MAGIC_1024: i64 = 1024 |
| 264 | const SYS_MAGIC_1000000: i64 = 1000000 |
| 265 | const SYS_MAGIC_4294967296: i64 = 4294967296 |
| 267 | const SYS_READ_GROW_INIT: i64 = 65536 |
| 268 | const SYS_MAGIC_100000: i64 = 100000 |
| 286 | const SYS_READ: i64 = 0 |
| 287 | const SYS_WRITE: i64 = 1 |
| 288 | const SYS_CLOSE: i64 = 3 |
| 289 | const SYS_LSEEK: i64 = 8 |
| 290 | const SYS_OPENAT: i64 = 257 |
| 291 | const SYS_EXIT: i64 = 60 |
| 292 | const SYS_MMAP: i64 = 9 |
| 293 | const SYS_CLOCK_GETTIME: i64 = 228 |
| 294 | const SYS_IOCTL: i64 = 16 |
| 295 | const SYS_CLOCK_NANOSLEEP: i64 = 230 |
| 299 | const SYS_CHROOT: i64 = 161 |
| 300 | const SYS_MOUNT: i64 = 165 |
| 301 | const SYS_UNSHARE: i64 = 272 |
| 302 | const SYS_GETUID: i64 = 102 |
| 303 | const SYS_GETGID: i64 = 104 |
| 304 | const SYS_POLL: i64 = 7 |
| 308 | const SYS_READ: i64 = 63 |
| 309 | const SYS_WRITE: i64 = 64 |
| 310 | const SYS_CLOSE: i64 = 57 |
| 311 | const SYS_LSEEK: i64 = 62 |
| 312 | const SYS_OPENAT: i64 = 56 |
| 313 | const SYS_EXIT: i64 = 93 |
| 314 | const SYS_MMAP: i64 = 222 |
| 315 | const SYS_CLOCK_GETTIME: i64 = 113 |
| 316 | const SYS_IOCTL: i64 = 29 |
| 317 | const SYS_CLOCK_NANOSLEEP: i64 = 115 |
| 324 | const SYS_CHROOT: i64 = 51 |
| 325 | const SYS_MOUNT: i64 = 40 |
| 326 | const SYS_UNSHARE: i64 = 97 |
| 327 | const SYS_GETUID: i64 = 174 |
| 328 | const SYS_GETGID: i64 = 176 |
| 329 | const SYS_POLL: i64 = 73 |
| 387 | const SYS_PATH_MAX: i64 = 4096 // Linux PATH_MAX; getcwd returns -ERANGE below it |
| 391 | const MODE_0755: i64 = 0x1ed // rwxr-xr-x : default mode for a created directory |
| 406 | const AT_FDCWD: i64 = -100 |
| 511 | const NX_MO_RELAXED: i64 = 0 |
| 512 | const NX_MO_CONSUME: i64 = 1 |
| 513 | const NX_MO_ACQUIRE: i64 = 2 |
| 514 | const NX_MO_RELEASE: i64 = 3 |
| 515 | const NX_MO_ACQ_REL: i64 = 4 |
| 516 | const NX_MO_SEQ_CST: i64 = 5 |
| 518 | const NXA_SMALL_MAX: i64 = 256 |
| 519 | const NXA_CHUNK: i64 = 262144 |
| 520 | const NXA_ALIGN: i64 = 16 |
| 521 | const NXA_GAP: i64 = 16 |
| 522 | const NXA_STATE: i64 = 4096 |
| 528 | const NXA_RING: i64 = 128 |
| 529 | const NXA_RBASE: i64 = 64 |
| 564 | const NXA_LOCK: i64 = 4 |
| 572 | const NXA_LOCK_WARN: i64 = NXA_RING * 8 |
| 576 | const NXA_LOCK_WARNED: i64 = 5 |
| 578 | const NXA_CHUNKBASE: i64 = 320 |
| 579 | const NXA_CHUNKMAX: i64 = 192 |
| 600 | const NXA_MAP_INVALID:i64=0-22 // Linux EINVAL, a protocol value rather than a resource budget. |
| 652 | const SYS_STATFS_X86_MEASURED: i64 = 137 |
| 653 | const STATFS_BUF_BYTES: i64 = 144 |
| 654 | const STATFS_I_BSIZE: i64 = 1 |
| 655 | const STATFS_I_BLOCKS: i64 = 2 |
| 656 | const STATFS_I_BAVAIL: i64 = 4 |
| 657 | const STATFS_PERMIL: i64 = 1000 |
| 658 | const STATFS_ERR: i64 = 0 - 1 |
| 1003 | const O_RDONLY: i64 = 0 |
| 1004 | const O_WRONLY_CT: i64 = 0x241 // O_CREAT | O_WRONLY | O_TRUNC |
| 1005 | const O_WRONLY_CA: i64 = 0x441 // O_CREAT | O_WRONLY | O_APPEND |
| 1013 | const O_RDWR_CREATE: i64 = 0x42 |
| 1034 | const MODE_0644: i64 = 0x1a4 // rw-r--r-- : default mode for a generated artifact |
| 1039 | const MODE_0755: i64 = 0x1ed |
| 1052 | const ACCEPT_TMO_S: i64 = 30 |
| 1059 | const O_WRONLY_CREATE_EXCLUSIVE: i64 = 0x1 | 0x40 | 0x80 |
| 1065 | const O_DIRECTORY: i64 = 0x10000 |
| 1079 | const O_CLOEXEC: i64 = 0x80000 |
| 1080 | const O_NOFOLLOW: i64 = 0x20000 |
| 1081 | const O_NONBLOCK: i64 = 0x800 |
| 1082 | const MODE_0600: i64 = 0x180 |
| 1147 | const SYS_LOCK_SH: i64 = 1 |
| 1148 | const SYS_LOCK_EX: i64 = 2 |
| 1149 | const SYS_LOCK_NB: i64 = 4 |
| 1150 | const SYS_LOCK_UN: i64 = 8 |
| 1195 | const SYS_SETPGID: i64 = 109 |
| 1198 | const SYS_SETPGID: i64 = 154 |
| 1221 | const RLIMIT_CPU: i64 = 0 |
| 1222 | const RLIMIT_AS: i64 = 9 |
| 1223 | const WNOHANG: i64 = 1 |
| 1317 | const SYS_CLONE: i64 = 56 |
| 1318 | const SYS_EXECVE: i64 = 59 |
| 1319 | const SYS_WAIT4: i64 = 61 |
| 1320 | const SYS_PIPE2: i64 = 293 |
| 1321 | const SYS_DUP3: i64 = 292 |
| 1325 | const SYS_CLONE: i64 = 220 |
| 1326 | const SYS_EXECVE: i64 = 221 |
| 1327 | const SYS_WAIT4: i64 = 260 |
| 1328 | const SYS_PIPE2: i64 = 59 |
| 1329 | const SYS_DUP3: i64 = 24 |
| 1335 | const CLONE_VM: i64 = 0x00000100 |
| 1336 | const CLONE_VFORK: i64 = 0x00004000 |
| 1337 | const SIGCHLD: i64 = 17 |
| 1387 | const NX_SYS_PRCTL: i64 = 167 |
| 1388 | const NX_PR_SET_PDEATHSIG: i64 = 1 |
| 1389 | const NX_PR_SET_CHILD_SUBREAPER: i64 = 36 |
| 1404 | const SYS_WAITID_PORTABLE: i64 = 95 |
| 1405 | const NX_WAIT_P_PID: i64 = 1 |
| 1406 | const NX_WAIT_EXITED: i64 = 4 |
| 1407 | const NX_WAIT_NOWAIT: i64 = 0x01000000 |
| 1408 | const NX_WAIT_SIGINFO_BYTES: i64 = 128 |
| 1415 | const NX_FD_DENT_BUFFER: i64 = 4096 |
| 1416 | const NX_SYS_CLOSE_RANGE: i64 = 436 // Linux x86_64 and asm-generic ABI |
| 1417 | const NX_FD_UINT_MAX: i64 = 4294967295 |
| 1589 | const SYS_GETDENTS64: i64 = 217 |
| 1592 | const SYS_GETDENTS64: i64 = 61 |
| 1595 | const DT_UNKNOWN: i64 = 0 |
| 1596 | const DT_FIFO: i64 = 1 |
| 1597 | const DT_CHR: i64 = 2 |
| 1598 | const DT_DIR: i64 = 4 |
| 1599 | const DT_BLK: i64 = 6 |
| 1600 | const DT_REG: i64 = 8 |
| 1601 | const DT_LNK: i64 = 10 |
| 1602 | const DT_SOCK: i64 = 12 |
| 1790 | const SYS_SOCKET: i64 = 41 |
| 1791 | const SYS_BIND: i64 = 49 |
| 1792 | const SYS_LISTEN: i64 = 50 |
| 1793 | const SYS_ACCEPT: i64 = 43 |
| 1794 | const SYS_CONNECT: i64 = 42 |
| 1795 | const SYS_SETSOCKOPT: i64 = 54 |
| 1796 | const SYS_SENDTO: i64 = 44 |
| 1797 | const SYS_RECVFROM: i64 = 45 |
| 1798 | const SYS_SHUTDOWN: i64 = 48 |
| 1802 | const SYS_SOCKET: i64 = 198 |
| 1803 | const SYS_BIND: i64 = 200 |
| 1804 | const SYS_LISTEN: i64 = 201 |
| 1805 | const SYS_ACCEPT: i64 = 202 |
| 1806 | const SYS_CONNECT: i64 = 203 |
| 1807 | const SYS_SETSOCKOPT: i64 = 208 |
| 1808 | const SYS_SENDTO: i64 = 206 |
| 1809 | const SYS_RECVFROM: i64 = 207 |
| 1810 | const SYS_SHUTDOWN: i64 = 210 |
| 1814 | const SOL_SOCKET: i64 = 1 |
| 1815 | const SO_REUSEADDR: i64 = 2 |
| 1820 | const SO_SNDTIMEO: i64 = 21 |
| 1821 | const SO_RCVTIMEO: i64 = 20 |
| 1849 | const SYS_ALARM: i64 = 37 |
| 1852 | const AF_INET: i64 = 2 |
| 1853 | const SOCK_STREAM: i64 = 1 |
| 1854 | const SOCK_DGRAM: i64 = 2 |
| 1960 | const SYS_SENDMSG: i64 = 46 |
| 1961 | const SYS_RECVMSG: i64 = 47 |
| 1962 | const SYS_SOCKETPAIR: i64 = 53 |
| 1963 | const SCM_AF_UNIX: i64 = 1 |
| 1964 | const SCM_SOL_SOCKET: i64 = 1 |
| 1965 | const SCM_RIGHTS_TYPE: i64 = 1 |
| 1966 | const SCM_MSG_CMSG_CLOEXEC: i64 = 1073741824 |
| 1967 | const SCM_MSGHDR_BYTES: i64 = 56 |
| 1968 | const SCM_MSGHDR_OFF_IOV: i64 = 16 |
| 1969 | const SCM_MSGHDR_OFF_IOVLEN: i64 = 24 |
| 1970 | const SCM_MSGHDR_OFF_CTRL: i64 = 32 |
| 1971 | const SCM_MSGHDR_OFF_CTRLLEN: i64 = 40 |
| 1972 | const SCM_IOVEC_BYTES: i64 = 16 |
| 1973 | const SCM_IOVEC_OFF_BASE: i64 = 0 |
| 1974 | const SCM_IOVEC_OFF_LEN: i64 = 8 |
| 1975 | const SCM_CMSG_OFF_LEN: i64 = 0 |
| 1976 | const SCM_CMSG_OFF_LEVEL: i64 = 8 |
| 1977 | const SCM_CMSG_OFF_TYPE: i64 = 12 |
| 1978 | const SCM_CMSG_OFF_DATA: i64 = 16 |
| 1979 | const SCM_CMSG_LEN_1FD: i64 = 20 |
| 1980 | const SCM_CMSG_SPACE_1FD: i64 = 24 |
| 1981 | const SCM_IOV_COUNT_ONE: i64 = 1 |
| 1982 | const SCM_U32_BYTES: i64 = 4 |
| 1983 | const SCM_BYTE_RADIX: i64 = 256 |
| 1984 | const SCM_FDPAIR_BYTES: i64 = 8 |
| 1987 | const SCM_PAYLOAD_BYTES: i64 = 1 |
| 1988 | const SCM_PAYLOAD_BYTE: i64 = 70 |
| 1992 | const SCM_ERR_NO_CMSG: i64 = 0 - 901 |
| 1993 | const SCM_ERR_CMSG_LEN: i64 = 0 - 902 |
| 1994 | const SCM_ERR_CMSG_LEVEL: i64 = 0 - 903 |
| 1995 | const SCM_ERR_CMSG_TYPE: i64 = 0 - 904 |
| 2067 | const SCM_SUN_PATH_OFF: i64 = 2 // sockaddr_un = [sa_family: u16][sun_path: 108] |
| 2068 | const SCM_SUN_BYTES: i64 = 110 |
| 2069 | const SCM_SUN_PATH_MAX: i64 = 107 |
| 2194 | const NX_FILE_PERMISSION_MASK:i64=511 |
| 2195 | const NX_FILE_DESCRIPTOR_INVALID:i64=0-22 |
| 2201 | const NX_STAT_X64_BYTES:i64=144 |
| 2202 | const NX_STAT_X64_MODE_OFFSET:i64=24 |
| 2203 | const NX_STAT_X64_BLOCK_OFFSET:i64=56 |
| 2204 | const NX_STAT_X64_SIZE_OFFSET:i64=48 |
| 2205 | const NX_STAT_X64_DEVICE_OFFSET:i64=0 |
| 2206 | const NX_STAT_X64_INODE_OFFSET:i64=8 |
| 2207 | const NX_STAT_TYPE_MASK:i64=61440 |
| 2208 | const NX_STAT_REGULAR_FILE:i64=32768 |
| 2274 | const NX_BD_BYTES: i64 = 24 |
| 2275 | const NX_BD_MIN_CAP: i64 = 64 |
| 2276 | const NX_BD_MIN_GROW: i64 = 64 |
| 2390 | const NX_BO_BYTES:i64=24 |
| 2391 | const NX_BO_I64_MAX:i64=9223372036854775807 |
| 2392 | const NX_BO_INVALID:i64=-100 |
| 2393 | const NX_BO_RANGE:i64=-101 |
| 2394 | const NX_BO_CAPACITY:i64=-102 |
| 2395 | const NX_BO_ALLOCATION:i64=-103 |
| 2396 | const NX_BO_ALIAS:i64=-104 |
| 2397 | const NX_BO_RELEASE:i64=-105 |
| 2437 | const TR_ERR_DRAIN: i64 = 0 - 8 |
| 2438 | const TR_ERR_FD_SETUP: i64 = 0 - 12 |
| 2439 | const TR_ERR_PARENT_LIFETIME: i64 = 0 - 11 |
| 2440 | const TR_DRAIN_BYTES: i64 = 4096 |
| 2442 | const TR_EINTR: i64 = 0 - 4 |
| 2444 | const TR_EINTR_MAX: i64 = 4096 |
| 2461 | const TR_EXIT_EXECFAIL: i64 = 127 |
| 2462 | const TR_MODE_0644: i64 = 420 |
| 2618 | const TR_ERR_TIMEOUT: i64 = 0 - 5 |
| 2619 | const TR_SIGKILL: i64 = 9 |
| 2652 | const TR_PROMOTE: i64 = 0 - 7 // distinct from TR_ERR_TIMEOUT (-5) and TR_ERR_CHDIR (-6) |
| 2653 | const TR_POLLFD_BYTES: i64 = 8 // sizeof(struct pollfd) |
| 2654 | const TR_POLLIN: i64 = 1 // POLLIN |
| 2655 | const TR_PF_EV_OFF: i64 = 4 // offsetof(struct pollfd, events) |
| 2656 | const TR_PF_RE_OFF: i64 = 6 // offsetof(struct pollfd, revents) |
| 2657 | const TR_PF_FD_BYTES: i64 = 4 // sizeof(i32 fd) |
| 2658 | const TR_BITS_PER_BYTE: i64 = 8 |
| 2659 | const TR_BYTE_MASK: i64 = 0xff |
| 2755 | const TR_ERR_CHDIR: i64 = 0 - 6 |
| 2763 | const TR_FIT: i64 = 0 |
| 2764 | const TR_CUT: i64 = 1 |
| 2804 | const TR_CONTROL_BYTES: i64 = 4096 |
| 2805 | const TR_ERR_GROUP: i64 = 0 - 9 |
| 2806 | const TR_ERR_ALLOC: i64 = 0 - 10 |
| 2807 | const TR_ECHILD: i64 = 0 - 10 // Linux errno, distinct from the public result namespace |
| 3078 | const GV_NL: i64 = 10 |
| 3082 | const GV_PLAN_HEADER: i64 = 3 |
| 3083 | const GV_PLAN_ENTRY: i64 = 3 |
| 3084 | const GV_I64_BYTES: i64 = 8 |
| 3173 | const GV_CTR_BYTES: i64 = 24 |
| 3174 | const GV_NUM_SCRATCH: i64 = 28 |
| 3175 | const GV_ZERO: i64 = 48 |
| 3176 | const GV_B10: i64 = 10 |
| 3219 | const CE_ENV_PUBLISHED: i64 = 0 |
| 3220 | const CE_ENV_REFUSED_BARE: i64 = 1 |
| 3221 | const CE_ENV_REFUSED_NO_INTERVAL: i64 = 2 |
| 3222 | const CE_ENV_REFUSED_EXCLUDES: i64 = 3 |
| 3371 | const GV_MODE_644: i64 = 420 |
| 3372 | const GV_LINE: i64 = 512 |
| 3373 | const GV_TAB: i64 = 9 |
| 3374 | const GV_SLASH: i64 = 47 |
| 3375 | const GV_MINUS: i64 = 45 |
| 3583 | const GV_ENV_FIELDS: i64 = 16 |
| 3584 | const GV_ENV_BYTES: i64 = 128 // GV_ENV_FIELDS * 8 |
| 3585 | const GV_ENV_K: i64 = 0 |
| 3586 | const GV_ENV_N: i64 = 1 |
| 3587 | const GV_ENV_RATE: i64 = 2 |
| 3588 | const GV_ENV_WLO: i64 = 3 |
| 3589 | const GV_ENV_WHI: i64 = 4 |
| 3590 | const GV_ENV_BLO: i64 = 5 |
| 3591 | const GV_ENV_BHI: i64 = 6 |
| 3592 | const GV_ENV_LO: i64 = 7 |
| 3593 | const GV_ENV_HI: i64 = 8 |
| 3594 | const GV_ENV_CLUSTERS: i64 = 9 |
| 3595 | const GV_ENV_B: i64 = 10 |
| 3596 | const GV_ENV_SEED: i64 = 11 |
| 3597 | const GV_ENV_MEASURED: i64 = 12 |
| 3598 | const GV_ENV_Z: i64 = 13 |
| 3599 | const GV_ENV_WIDTH: i64 = 14 |
| 3600 | const GV_ENV_TARGET: i64 = 15 |
| 3601 | const GV_ENV_REFUSED_PARTITION: i64 = 0 - 1 |
| 3602 | const GV_MICRO: i64 = 1000000 |
| 3603 | const GV_PERMIL: i64 = 1000 |
| 3605 | const GV_Z95_MICRO: i64 = 1959964 |
| 3608 | const GV_SQRT_IN_SCALE: i64 = 100 |
| 3609 | const GV_SQRT_OUT_SCALE: i64 = 10000 |
| 3611 | const GV_BOOT_B_DEFAULT: i64 = 1000 |
| 3613 | const GV_BOOT_SEED_DEFAULT: i64 = 20260827 |
| 3615 | const GV_PM_A: i64 = 16807 |
| 3616 | const GV_PM_M: i64 = 2147483647 |
| 3618 | const GV_ENV_N_MAX: i64 = 2000000000 |
| 3620 | const GV_ISQRT_HI: i64 = 3037000499 |
| 3622 | const GV_HIST_BINS: i64 = 1001 |
| 3623 | const GV_HIST_BYTES: i64 = 8008 // GV_HIST_BINS * 8 |
| 3625 | const GV_PCT_LO_PERMIL: i64 = 25 |
| 3626 | const GV_PCT_HI_PERMIL: i64 = 975 |
| 3627 | const GV_ENV_UNDECLARED: *u8 = "UNDECLARED" |
functions
| 332 | func sys_ioctl(fd: i64, request: i64, arg: i64) -> i64 |
| 343 | func sys_poll(fds: *u8, nfds: i64, timeout_ms: i64) -> i64 |
| 349 | func sys_write(fd: i64, buf: *u8, count: i64) -> i64 |
| 353 | func sys_read(fd: i64, buf: *u8, count: i64) -> i64 |
| 357 | func sys_close(fd: i64) -> i64 |
| 367 | func sys_chdir(path: *u8) -> i64 |
| 392 | func sys_getcwd(buf: *u8, cap: i64) -> i64 calls 1: sys_mmap |
| 411 | func sys_unlinkat(path: *u8) -> i64 |
| 418 | func sys_fchmodat(path: *u8, mode: i64) -> i64 calls 1: sys_mmap |
| 434 | func sys_exit_group(code: i64) -> i64 |
| 451 | func sys_setpriority(prio: i64) -> i64 |
| 459 | func sys_setpriority_of(pid: i64, prio: i64) -> i64 |
| 601 | func sys_munmap_direct(addr:*u8,len:i64)->i64 |
| 606 | func sys_munmap(addr: *u8, len: i64) -> i64 |
| 613 | func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64 |
| 661 | func sys_statfs(path: *u8, buf: *i64) -> i64 |
| 666 | func sys_fs_avail_bytes(path: *u8) -> i64 |
| 675 | func sys_fs_used_permil(path: *u8) -> i64 |
| 684 | func sys_exit(code: i64) -> i64 |
| 718 | func nxa_dump_printable(src: i64, n: i64) -> i64 |
| 739 | func nxa_dump_sizes() -> i64 |
| 764 | func nxa_report_overrun(sz: i64, gs: i64) -> i64 |
| 794 | func nxa_die(msg: *u8) -> i64 |
| 804 | func nxa_lock_addr() -> *i64 |
| 812 | func nxa_lock_take() -> i64 |
| 841 | func nxa_lock_give() -> i64 |
| 855 | func sys_mmap_try(size:i64)->*u8 |
| 862 | func sys_mmap(size: i64) -> *u8 |
| 944 | func sys_arena_mark() -> i64 calls 1: sys_mmap |
| 958 | func sys_arena_reset() -> i64 |
| 982 | func sys_mmap_shared(size: i64) -> *u8 called by 1: tr_run_capture_core_owned |
| 996 | func sys_madvise(addr: *u8, len: i64, advice: i64) -> i64 |
| 1007 | func sys_openat_rd(path: *u8) -> i64 |
| 1014 | func sys_openat_rdwr(path: *u8, mode: i64) -> i64 |
| 1053 | func sys_openat_wr(path: *u8, mode: i64) -> i64 called by 1: tr_run_redirect |
| 1060 | func sys_openat_exclusive(path: *u8, mode: i64) -> i64 |
| 1066 | func sys_openat_directory(path: *u8) -> i64 |
| 1073 | func sys_openat_append(path: *u8, mode: i64) -> i64 called by 1: gv_journal |
| 1083 | func sys_openat_lock(path: *u8) -> i64 |
| 1091 | func sys_symlinkat(target: *u8, linkpath: *u8) -> i64 |
| 1103 | func sys_readlinkat(path: *u8, buf: *u8, cap: i64) -> i64 |
| 1120 | func sys_renameat(oldpath: *u8, newpath: *u8) -> i64 |
| 1133 | func sys_fsync(fd: i64) -> i64 |
| 1151 | func sys_flock(fd: i64, op: i64) -> i64 |
| 1159 | func sys_fstatat(path: *u8, statbuf: *u8) -> i64 |
| 1166 | func sys_utimensat(path: *u8, times: *i64) -> i64 |
| 1185 | func nx_kill(pid: i64, sig: i64) -> i64 { return __syscall(129, pid, sig, 0, 0, 0, 0) } |
| 1200 | func sys_setpgid(pid: i64, pgid: i64) -> i64 { return __syscall(SYS_SETPGID, pid, pgid, 0, 0, 0, 0) } called by 1: tr_run_capture_core_owned |
| 1214 | func nx_prlimit(pid: i64, resource: i64, new_limit: *u8, old_limit: *u8) -> i64 |
| 1226 | func sys_mkdir(path: *u8, mode: i64) -> i64 { return __syscall(34, AT_FDCWD, path, mode, 0, 0, 0) } |
| 1229 | func nx_chmod(path: *u8, mode: i64) -> i64 { return __syscall(53, AT_FDCWD, path, mode, 0, 0, 0) } |
| 1233 | func nx_setsid() -> i64 { return __syscall(112, 0, 0, 0, 0, 0, 0) } |
| 1237 | func sys_clock_gettime_mono(ts: *i64) -> i64 |
| 1245 | func sys_clock_gettime_real(ts: *i64) -> i64 |
| 1250 | func sys_now_realtime_sec() -> i64 |
| 1257 | func sys_now_realtime_ms() -> i64 |
| 1269 | func sys_now_realtime_us() -> i64 |
| 1278 | func sys_now_ms() -> i64 |
| 1289 | func sys_now_us() -> i64 |
| 1300 | func sys_clock_now_us() -> i64 calls 1: sys_now_us |
| 1350 | func sys_unshare(flags: i64) -> i64 |
| 1353 | func sys_mount(source: *u8, target: *u8, fs_type: *u8, mountflags: i64, data: *u8) -> i64 |
| 1356 | func sys_chroot(path: *u8) -> i64 |
| 1359 | func sys_getuid() -> i64 |
| 1362 | func sys_getgid() -> i64 |
| 1366 | func sys_fork() -> i64 |
| 1390 | func sys_prctl(option: i64, arg: i64) -> i64 called by 1: sys_bind_parent_lifetime |
| 1393 | func sys_bind_parent_lifetime(expected_parent: i64, signal: i64) -> i64 |
| 1409 | func sys_waitid(idtype: i64, id: i64, info: *u8, options: i64) -> i64 called by 1: tr_observe_exit |
| 1418 | func sys_close_inherited_proc(first: i64) -> i64 called by 1: sys_close_inherited calls 6: sys_openat_rdsys_mmapsys_getdents64dirent_reclensys_closesys_munmap |
| 1459 | func sys_close_inherited(first: i64) -> i64 |
| 1465 | func sys_execve_clean(path: *u8, argv: *i64, envp: *i64) -> i64 |
| 1471 | func sys_execve(path: *u8, argv: *i64, envp: *i64) -> i64 called by 1: sys_execve_clean |
| 1480 | func sys_wait4(pid: i64, status: *i64, options: i64) -> i64 |
| 1486 | func wait_exit_code(status: i64) -> i64 called by 1: wait_status_rc |
| 1494 | func wait_term_signal(status: i64) -> i64 called by 1: wait_status_rc |
| 1519 | func wait_status_rc(status: i64) -> i64 |
| 1542 | func sys_default_signal(sig: i64) -> i64 |
| 1551 | func sys_ignore_sigpipe() -> i64 calls 1: sys_mmap |
| 1566 | func sys_pipe2(fds: *i64, flags: i64) -> i64 |
| 1572 | func sys_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64 |
| 1606 | func sys_getdents64(fd: i64, buf: *u8, buf_len: i64) -> i64 called by 1: sys_close_inherited_proc |
| 1612 | func dirent_reclen(rec: *u8) -> i64 called by 1: sys_close_inherited_proc |
| 1619 | func dirent_type(rec: *u8) -> i64 |
| 1624 | func dirent_name(rec: *u8) -> *u8 |
| 1631 | func sys_read_file(path: *u8, out_len: *i64) -> *u8 |
| 1713 | func sys_free_file(buf: *u8, len: i64) -> i64 calls 1: sys_munmap |
| 1724 | func sys_map_file(path: *u8, out_len: *i64) -> *u8 |
| 1742 | func sys_sleep_ms(ms: i64) -> i64 |
| 1826 | func sys_setsockopt(fd: i64, level: i64, optname: i64, called by 1: sys_set_socket_timeout |
| 1836 | func sys_set_socket_timeout(fd: i64, secs: i64) -> i64 |
| 1850 | func sys_alarm(secs: i64) -> i64 { return __syscall(SYS_ALARM, secs, 0, 0, 0, 0, 0) } |
| 1856 | func sys_socket(domain: i64, sock_type: i64, protocol: i64) -> i64 |
| 1868 | func sockaddr_in_init(addr: *u8, port: i64) -> i64 |
| 1891 | func sys_bind(fd: i64, addr: *u8, addr_len: i64) -> i64 called by 1: sys_unix_listen |
| 1894 | func sys_listen(fd: i64, backlog: i64) -> i64 called by 1: sys_unix_listen |
| 1901 | func sys_accept(fd: i64) -> i64 |
| 1904 | func sys_accept_with_addr(fd: i64, addr: *u8, addr_len: *i64) -> i64 |
| 1908 | func sys_shutdown(fd: i64, how: i64) -> i64 |
| 1911 | func sys_connect(fd: i64, addr: *u8, addr_len: i64) -> i64 called by 1: sys_unix_connect_fd |
| 1914 | func sys_sendto(fd: i64, buf: *u8, n: i64, flags: i64, |
| 1918 | func sys_recvfrom(fd: i64, buf: *u8, n: i64, flags: i64, |
| 1997 | func scm_zero(base: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { base[i] = 0; i = i + 1 } return 0 } |
| 1998 | func scm_put_i64(base: *u8, off: i64, v: i64) -> i64 |
| 2003 | func scm_get_i64(base: *u8, off: i64) -> i64 called by 1: sys_recv_fd |
| 2010 | func scm_put_u32(base: *u8, off: i64, v: i64) -> i64 called by 1: sys_send_fd |
| 2020 | func scm_get_u32(base: *u8, off: i64) -> i64 called by 1: sys_recv_fd |
| 2032 | func sys_sendmsg(fd: i64, msg: *u8, flags: i64) -> i64 called by 1: sys_send_fd |
| 2035 | func sys_recvmsg(fd: i64, msg: *u8, flags: i64) -> i64 called by 1: sys_recv_fd |
| 2059 | func sys_socketpair(domain: i64, sock_type: i64, protocol: i64, sv: *u8) -> i64 |
| 2070 | func sys_unix_listen(path: *u8, backlog: i64) -> i64 |
| 2098 | func sys_unix_connect_fd(path: *u8) -> i64 |
| 2122 | func sys_send_fd(sock: i64, fd: i64) -> i64 |
| 2156 | func sys_recv_fd(sock: i64, flags: i64) -> i64 |
| 2196 | func sys_fchmod_fd(fd:i64,mode:i64)->i64 |
| 2209 | func sys_fstat_fd(fd:i64,stat:*u8)->i64 |
| 2213 | func sys_stat_permissions(stat:*u8)->i64 |
| 2278 | func nx_bd_new(initial_cap: i64) -> *NxBufDyn calls 1: sys_mmap |
| 2290 | func nx_bd_grow(b: *NxBufDyn, extra: i64) -> i64 |
| 2307 | func nx_bd_byte(b: *NxBufDyn, v: i64) -> i64 |
| 2314 | func nx_bd_bytes(b: *NxBufDyn, src: *u8, n: i64) -> i64 calls 1: nx_bd_grow |
| 2325 | func nx_bd_u16(b: *NxBufDyn, v: i64) -> i64 calls 1: nx_bd_byte |
| 2330 | func nx_bd_u32(b: *NxBufDyn, v: i64) -> i64 calls 1: nx_bd_byte |
| 2337 | func nx_bd_u64(b: *NxBufDyn, v: i64) -> i64 calls 1: nx_bd_byte |
| 2347 | func nx_bd_str(b: *NxBufDyn, s: *u8) -> i64 calls 1: nx_bd_byte |
| 2357 | func nx_bd_strz(b: *NxBufDyn, s: *u8) -> i64 calls 1: nx_bd_byte |
| 2366 | func nx_bd_clear(b: *NxBufDyn) -> i64 |
| 2373 | func nx_bd_patch_u32(b: *NxBufDyn, off: i64, v: i64) -> i64 |
| 2398 | func nx_bo_state(b:*NxBufOwned)->i64 |
| 2405 | func nx_bo_append(b:*NxBufOwned,src:*u8,n:i64,max_bytes:i64)->i64 |
| 2427 | func nx_bo_release(b:*NxBufOwned)->i64 |
| 2464 | func tr_exec_failed(path: *u8) -> i64 called by 3: tr_run_capturetr_run_capture_deadlinetr_run_capture_core_owned calls 2: sys_writesys_exit |
| 2510 | func tr_run_redirect(path: *u8, argv: *i64, out_path: *u8, err_path: *u8) -> i64 |
| 2548 | func tr_run_capture(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64) -> i64 called by 2: tr_run_capture_deadlinetr_run1 calls 10: sys_mmapsys_pipe2sys_forksys_closesys_dup3sys_execve_clean+4 |
| 2623 | func tr_run_capture_to(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64 |
| 2660 | func tr_pollfd_set(p: *u8, fd: i64) -> i64 |
| 2672 | func tr_run_capture_deadline(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, deadline_ms: i64, out_pid: *i64, out_rfd: *i64) -> i64 |
| 2756 | func tr_run_capture_cwd(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, cwd: *u8) -> i64 calls 1: tr_run_capture_core |
| 2765 | func tr_drain_tr(rfd: i64, out: *u8, cap: i64, trunc: *i64) -> i64 |
| 2798 | func tr_run_capture_tr(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, trunc: *i64) -> i64 |
| 2808 | func tr_clock_ms(ts: *i64) -> i64 called by 3: tr_drain_until_ownedtr_watchdog_childtr_run_capture_core_owned calls 1: sys_clock_gettime_mono |
| 2813 | func tr_observe_exit(pid: i64, info: *u8) -> i64 |
| 2818 | func tr_reap(pid: i64, status: *i64) -> i64 |
| 2826 | func tr_drain_until(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64)->i64 |
| 2829 | func tr_drain_until_owned(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64,owned:*NxBufOwned,max_bytes:i64)->i64 called by 2: tr_drain_untiltr_run_capture_core_owned calls 7: sys_mmaptr_clock_mstr_pollfd_setsys_pollsys_readnx_bo_append+1 |
| 2882 | func tr_capture_stop(pid: i64, control: *i64) -> i64 |
| 2890 | func tr_watchdog_child(owner: i64, pid: i64, control: *i64, deadline: i64, wfd: i64, scratch: *u8) -> i64 called by 1: tr_watchdog_start calls 8: sys_bind_parent_lifetimesys_dup3sys_closesys_close_inheritedsys_writetr_clock_ms+2 |
| 2911 | func tr_watchdog_start(owner: i64, pid: i64, control: *i64, deadline: i64) -> i64 called by 1: tr_run_capture_core_owned calls 10: sys_mmapsys_pipe2sys_munmapsys_forktr_watchdog_childsys_exit+4 |
| 2938 | func tr_run_capture_core(path:*u8,argv:*i64,out:*u8,cap:i64,outlen:*i64,timeout_ms:i64,trunc:*i64,cwd:*u8)->i64 |
| 2943 | func tr_run_capture_owned(path:*u8,argv:*i64,owned:*NxBufOwned,timeout_ms:i64,max_bytes:i64,cwd:*u8)->i64 |
| 2949 | func tr_run_capture_core_owned(path:*u8,argv:*i64,out:*u8,cap:i64,outlen:*i64,timeout_ms:i64,trunc:*i64,cwd:*u8,owned:*NxBufOwned,max_bytes:i64)->i64 called by 2: tr_run_capture_coretr_run_capture_owned calls 21: sys_mmap_sharedtr_clock_mssys_munmapsys_pipe2sys_forksys_close+15 |
| 3029 | func tr_run1(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64) -> i64 |
| 3037 | func tr_run1_to(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64 |
| 3045 | func tr_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 3086 | func gv_plan_name_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 |
| 3092 | func gv_plan_new(names: *u8) -> *i64 |
| 3125 | func gv_plan_take(plan: *i64, name: *u8) -> i64 |
| 3140 | func gv_plan_complete(plan: *i64) -> i64 called by 1: gv_plan_finish |
| 3150 | func gv_plan_check(plan: *i64, name: *u8, cond: i64, ctr: *i64) -> i64 |
| 3154 | func gv_plan_finish(plan: *i64, ctr: *i64) -> i64 |
| 3178 | func gv_puts(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 16: gv_plan_finishgv_kvce_env_refusece_number_envelopegv_values_headgv_check_eq+10 calls 1: sys_write |
| 3179 | func gv_num(v: i64) -> i64 called by 11: gv_plan_finishgv_kvce_env_refusece_number_envelopegv_check_eqgv_check_near+5 calls 3: sys_mmapsys_writesys_munmap |
| 3205 | func gv_kv(k: *u8, v: i64) -> i64 |
| 3223 | func ce_env_refuse(k: *u8, why: *u8, n: i64, lo: i64, hi: i64, code: i64) -> i64 |
| 3229 | func ce_number_envelope(k: *u8, v: i64, n: i64, lo: i64, hi: i64, null_v: i64) -> i64 |
| 3240 | func gv_values_head() -> i64 calls 1: gv_puts |
| 3255 | func gv_check_eq(name: *u8, actual: i64, expected: i64, ctr: *i64) -> i64 |
| 3268 | func gv_check_near(name: *u8, actual: i64, expected: i64, tol: i64, ctr: *i64) -> i64 |
| 3281 | func gv_ctr() -> *i64 |
| 3302 | func gv_need(name: *u8, present: i64, ctr: *i64) -> i64 |
| 3326 | func gv_subjects(name: *u8, n: i64, ctr: *i64) -> i64 |
| 3336 | func gv_head(title: *u8) -> i64 { gv_puts(title); gv_puts("\n\n" as *u8); return 0 } calls 1: gv_puts |
| 3338 | func gv_check(name: *u8, cond: i64, ctr: *i64) -> i64 called by 6: gv_plan_checkgv_plan_finishgv_check_eqgv_check_neargv_envelope_checkmain calls 1: gv_puts |
| 3355 | func gv_bite(name: *u8, bad: i64, good: i64, ctr: *i64) -> i64 calls 1: gv_puts |
| 3377 | func gv_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } |
| 3378 | func gv_catn(d: *u8, o: i64, v: i64) -> i64 |
| 3398 | func gv_journal(name: *u8, passed: i64, total: i64, green: i64) -> i64 called by 1: gv_verdict calls 8: sys_openat_appendsys_mmapgv_catnsys_now_realtime_secgv_catsys_write+2 |
| 3449 | func gv_note_bare_rate(note: *u8) -> i64 |
| 3465 | func gv_verdict(name: *u8, ctr: *i64, note: *u8) -> i64 |
| 3629 | func gv_isqrt(v: i64) -> i64 called by 1: gv_wilson_permil |
| 3643 | func gv_wilson_permil(k: i64, n: i64, z_micro: i64, out: *i64) -> i64 |
| 3666 | func gv_rng_next(state: *i64) -> i64 called by 1: gv_boot_hier |
| 3678 | func gv_boot_hier(ck: *i64, cn: *i64, nc: i64, b: i64, seed: i64, out: *i64) -> i64 |
| 3740 | func gv_envelope(k: i64, n: i64, ck: *i64, cn: *i64, nc: i64, z_micro: i64, b: i64, seed: i64, width_target: i64, out: *i64) -> i64 |
| 3799 | func gv_envelope_width_ok(out: *i64) -> i64 |
| 3806 | func gv_env_pair(a: i64, b: i64) -> i64 |
| 3812 | func gv_envelope_print(label: *u8, out: *i64, harness: *u8) -> i64 |
| 3839 | func gv_envelope_json(d: *u8, o0: i64, out: *i64, harness: *u8) -> i64 |
| 3869 | func gv_at(buf: *u8, n: i64, at: i64, lit: *u8) -> i64 |
| 3880 | func gv_obj_has_n(buf: *u8, n: i64, at: i64) -> i64 |
| 3905 | func gv_bare_rate(buf: *u8, n: i64) -> i64 |
| 3935 | func gv_envelope_comparable(ha: *u8, hb: *u8) -> i64 calls 1: gv_at |
| 3953 | func gv_envelope_check(name: *u8, out: *i64, harness: *u8, ctr: *i64) -> i64 |
| 3960 | func cg_owned(mode:*u8,b:*NxBufOwned,limit:i64,tmo:i64)->i64 |
| 3965 | func main()->i64 |