nx_shader_capture_owned_expanded_t218.nx
buildroot/runtime/nx_shader_capture_owned_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)
structs
| 2268 | struct NxBufDyn |
| 2389 | struct NxBufOwned { buf:*u8, len:i64, cap:i64, } |
| 3483 | struct Sha256 { |
| 3980 | struct NxFileWriteResult |
| 4062 | struct NxFileReadRegion |
| 4144 | struct NxFilePrepareResult |
| 4206 | struct NxFilePublishResult |
| 4234 | struct NxFileTargetLock |
| 4281 | struct NxFileReplaceResult |
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 |
| 3481 | const K_MAGIC_536870912: i64 = 536870912 |
| 3520 | const M32: i64 = 0xFFFFFFFF |
| 3898 | const SHA256_WORD_ALIGN: i64 = 8 |
| 3899 | const SHA256_BLOCK_BYTES: i64 = 64 |
| 3900 | const SHA256_ROUND_WORDS: i64 = 64 |
| 3901 | const SHA256_WIDE_WORD: i64 = 8 |
| 3902 | const SHA256_PACKED_WORD: i64 = 4 |
| 3903 | const SHA256_STATE_WORDS: i64 = 8 |
| 3904 | const SHA256_DIGEST_BYTES: i64 = 32 |
| 3905 | const SHA256_SIGNED_MAX: i64 = 9223372036854775807 |
| 3906 | const SHA256_BITS_PER_BYTE: i64 = 8 |
| 3907 | const SHA256_E_INPUT: i64 = 0-1 |
| 3908 | const SHA256_E_WORKSPACE: i64 = 0-2 |
| 3909 | const SHA256_E_MAPPING: i64 = 0-3 |
| 3910 | const SHA256_E_RELEASE: i64 = 0-4 |
| 3974 | const FIO_EINTR: i64 = 0 - 4 |
| 3975 | const FIO_EIO: i64 = 0 - 5 |
| 3976 | const FIO_EINVAL: i64 = 0 - 22 |
| 3977 | const FIO_EEXIST: i64 = 0 - 17 |
| 3978 | const FIO_EBADMSG: i64 = 0 - 74 // Linux ABI: artifact digest mismatch. |
| 4403 | const CCZ_ASCII_0: i64 = 48 |
| 4404 | const CCZ_MINUS: i64 = 45 |
| 4405 | const CCZ_DEC: i64 = 10 |
| 4425 | const NXI_BUF: i64 = 24 |
| 4426 | const NXI_STDOUT: i64 = 1 |
| 4427 | const NXI_STDERR: i64 = 2 |
| 4483 | const VW_PROC_PATH_CAP: i64 = 256 // /proc/<pid>/status path buffer |
| 4484 | const VW_STATUS_BUF: i64 = 8192 // /proc status read buffer |
| 4485 | const VW_PTR_CELL: i64 = 16 // 2-i64 scratch cell (vw_num_at end-pointer out-param) |
| 4648 | const OSF_SLASH: i64 = 47 // '/' -- path separator (namespace-boundary test) |
| 4682 | const OSP_HZ_LINUX: i64 = 100 // Linux USER_HZ: /proc/<pid>/stat starttime ticks/sec |
| 4683 | const OSP_PATH_CAP: i64 = 256 |
| 4684 | const OSP_RD_CAP: i64 = 4096 |
| 4685 | const OSP_STAT_CAP: i64 = 262144 // /proc/stat whole-file read cap (btime scan) |
| 4686 | const OSP_DENT_BUF: i64 = 65536 // getdents64 batch buffer (proven sizing) |
| 4687 | const OSP_F_PPID: i64 = 2 // /proc/<pid>/stat field after ')': state=1 ppid=2 ... utime=12 stime=13 ... starttime=20 |
| 4688 | const OSP_F_START: i64 = 20 |
| 4689 | const OSP_F_UTIME: i64 = 12 // user-mode CPU ticks (cumulative) |
| 4690 | const OSP_F_STIME: i64 = 13 // kernel-mode CPU ticks (cumulative) |
| 4691 | const OSP_ASCII_0: i64 = 48 |
| 4692 | const OSP_ASCII_9: i64 = 57 |
| 4693 | const OSP_SP: i64 = 32 |
| 4694 | const OSP_NL: i64 = 10 |
| 4695 | const OSP_RP: i64 = 41 // ')' |
| 4696 | const OSP_SLASH: i64 = 47 |
| 4697 | const OSP_NUL: i64 = 0 |
| 4698 | const OSP_SENTINEL: i64 = 0 - 1 // "not available on this OS backend" |
| 4928 | const OSP_DIRENT_NAME_OFFSET: i64 = 19 // Linux linux_dirent64 ABI |
| 5003 | const FSX_MAGIC_4095: i64 = 4095 |
| 5005 | const FSX_READ_CAP: i64 = 1048576 // max bytes returned by `read` (truncation is MARKED, never silent) |
| 5006 | const FSX_DENY_CAP: i64 = 8192 // fs_read_deny.conf read cap |
| 5007 | const FSX_PATH_CAP: i64 = 1024 // lowercased path work buffer |
| 5008 | const FSX_DENT_BUF: i64 = 65536 // getdents64 batch buffer (matches the proven vsz/heal sizing) |
| 5009 | const FSX_LS_CAP: i64 = 200 // scale-law: max ls entries EMITTED; true total ALWAYS declared (65KB-dump fix) |
| 5010 | const FSX_RC_ABSENT: i64 = 3 // exit: path absent/unreadable (mirrors nx_fileop's exists convention) |
| 5011 | const FSX_RC_DENIED: i64 = 5 // exit: deny-list refused the read |
| 5012 | const FSX_UPPER_A: i64 = 65 // 'A' (ASCII lowercasing) |
| 5013 | const FSX_UPPER_Z: i64 = 90 // 'Z' |
| 5014 | const FSX_CASE_OFF: i64 = 32 // 'a' - 'A' |
| 5015 | const FSX_ASCII_0: i64 = 48 // '0' (decimal print) |
| 5100 | const FSX_SNIFF_CAP: i64 = 4096 |
| 5249 | const FSX_SEEK_END: i64 = 2 // lseek whence: EOF offset = size, WITHOUT reading a single byte |
| 5336 | const FSX_LINES_SCAN: i64 = 1048576 // line-addressing scan window (matches the proven read cap) |
| 5337 | const FSX_LINES_MAXOUT: i64 = 262144 // max bytes emitted by one `lines` call (transport-friendly) |
| 5338 | const FSX_LINES_DEFN: i64 = 40 // default line count when the caller omits it |
| 5339 | const FSX_LINES_MAXN: i64 = 400 // max lines per call |
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 called by 1: nx_bo_append |
| 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 |
| 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 called by 1: fio_prepare_copy |
| 1066 | func sys_openat_directory(path: *u8) -> i64 |
| 1073 | func sys_openat_append(path: *u8, mode: i64) -> i64 |
| 1083 | func sys_openat_lock(path: *u8) -> i64 called by 1: fio_target_lock_acquire |
| 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 called by 1: fio_publish_candidate |
| 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 called by 1: fio_exists |
| 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) } called by 1: fio_prepare_copy |
| 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 |
| 1612 | func dirent_reclen(rec: *u8) -> i64 |
| 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 calls 1: tr_run_capture_core_owned |
| 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 |
| 3169 | func nx_bits_popcount64(x: i64) -> i64 |
| 3173 | func nx_bits_popcount32(x: i64) -> i64 |
| 3182 | func nx_bits_clz32(x: i64) -> i64 called by 1: nx_bits_floor_log2 |
| 3186 | func nx_bits_ctz32(x: i64) -> i64 |
| 3195 | func nx_bits_clz64(x: i64) -> i64 |
| 3201 | func nx_bits_ctz64(x: i64) -> i64 |
| 3214 | func nx_bits_rotl64(x: i64, n: i64) -> i64 |
| 3218 | func nx_bits_rotr64(x: i64, n: i64) -> i64 |
| 3228 | func nx_bits_rotl32(x: i64, n: i64) -> i64 called by 1: nx_bits_rotl32_soft |
| 3235 | func nx_bits_rotr32(x: i64, n: i64) -> i64 |
| 3247 | func nx_bits_bswap64(x: i64) -> i64 |
| 3256 | func nx_bits_bswap32(x: i64) -> i64 |
| 3262 | func nx_bits_popcount64_soft(x: i64) -> i64 |
| 3270 | func nx_bits_popcount32_soft(x: i64) -> i64 |
| 3278 | func nx_bits_clz32_soft(x: i64) -> i64 |
| 3300 | func nx_bits_rotl64_soft(x: i64, n: i64) -> i64 |
| 3307 | func nx_bits_rotr64_soft(x: i64, n: i64) -> i64 |
| 3317 | func nx_bits_bswap64_soft(x: i64) -> i64 |
| 3325 | func nx_bits_bswap32_soft(x: i64) -> i64 |
| 3337 | func nx_bits_rotl32_soft(x: i64, n: i64) -> i64 calls 1: nx_bits_rotl32 |
| 3340 | func nx_bits_rotr32_soft(x: i64, n: i64) -> i64 calls 1: nx_bits_rotr32 |
| 3347 | func nx_bits_clz64_soft(x: i64) -> i64 |
| 3364 | func nx_bits_ctz64_soft(x: i64) -> i64 |
| 3380 | func nx_bits_ctz32_soft(x: i64) -> i64 |
| 3402 | func nx_bits_lowest(x: i64) -> i64 |
| 3412 | func nx_bits_clear_lowest(x: i64) -> i64 |
| 3420 | func nx_bits_is_pow2(x: i64) -> i64 |
| 3431 | func nx_bits_next_pow2_32(x: i64) -> i64 |
| 3447 | func nx_bits_parity64(x: i64) -> i64 |
| 3460 | func nx_bits_floor_log2(x: i64) -> i64 calls 1: nx_bits_clz32 |
| 3474 | func nx_bits_bextr(x: i64, start: i64, len: i64) -> i64 |
| 3524 | func rotr32(x: i64, n: i64) -> i64 {
calls 1: nx_bits_rotr32 |
| 3528 | func shr32(x: i64, n: i64) -> i64 { |
| 3535 | func sha256_k(i: i64) -> i64 {
called by 1: sha256_seed_allocated |
| 3605 | func blk_byte(c: *Sha256, n: i64) -> i64 {
called by 1: blk_word |
| 3611 | func blk_set_byte(c: *Sha256, n: i64, v: i64) -> i64 { |
| 3619 | func blk_word(c: *Sha256, i: i64) -> i64 { |
| 3633 | func sha256_compress_ni(c: *Sha256) -> i64 {
called by 1: sha256_compress |
| 3652 | func sha256_compress_ni_blocks(c: *Sha256, blocks: i64, nblk: i64) -> i64 {
called by 1: sha256_update |
| 3674 | func sha256_compress(c: *Sha256) -> i64 { |
| 3737 | func sha256_seed_allocated(c: *Sha256) -> i64 { |
| 3764 | func sha256_init(c: *Sha256) -> i64 { |
| 3775 | func sha256_update(c: *Sha256, bytes: *u8, n: i64) -> i64 { |
| 3805 | func sha256_final(c: *Sha256, out: *u8) -> i64 {
called by 3: sha256_digestsha256_digest_workspacefio_verify_sha256 calls 2: blk_set_bytesha256_compress |
| 3875 | func sha256_destroy(c: *Sha256) -> i64 { |
| 3884 | func sha256_digest(bytes: *u8, n: i64, out: *u8) -> i64 { |
| 3912 | func sha256_context_aligned_bytes() -> i64 { |
| 3915 | func sha256_workspace_bytes() -> i64 { |
| 3918 | func sha256_checked_input(bytes: *u8, n: i64, out: *u8) -> i64 { |
| 3925 | func sha256_ranges_overlap(a: i64, an: i64, b: i64, bn: i64) -> i64 {
called by 1: sha256_digest_workspace |
| 3931 | func sha256_init_workspace(workspace: *u8, capacity: i64) -> i64 { |
| 3942 | func sha256_digest_workspace(bytes: *u8, n: i64, out: *u8, workspace: *u8, capacity: i64) -> i64 { |
| 3956 | func sha256_digest_mapping_native(bytes: *u8, n: i64, out: *u8, mapping: i64) -> i64 {
called by 1: sha256_digest_checked_native calls 3: sha256_workspace_bytessha256_digest_workspacesys_munmap |
| 3965 | func sha256_digest_checked_native(bytes: *u8, n: i64, out: *u8) -> i64 { |
| 3989 | func fio_write_sync_fd(fd: i64, body: *u8, n: i64, result: *NxFileWriteResult) -> i64 |
| 4022 | func fio_sync_parent(path: *u8, result: *NxFileWriteResult) -> i64 |
| 4051 | func fio_unlink(path: *u8) -> i64 { return __syscall(263, 0 - 100, path as i64, 0, 0, 0, 0) } |
| 4054 | func fio_exists(path: *u8) -> i64 |
| 4073 | func fio_region_init(r: *NxFileReadRegion) -> i64 |
| 4079 | func fio_region_close(r: *NxFileReadRegion) -> i64 |
| 4087 | func fio_region_fail(r: *NxFileReadRegion,stage: *u8,code: i64) -> i64 |
| 4092 | func fio_region_open(path: *u8,r: *NxFileReadRegion) -> i64 called by 2: fio_prepare_copyfio_verify_sha256 calls 4: fio_region_initfio_region_failsys_openat_rdsys_lseek |
| 4108 | func fio_region_select(r: *NxFileReadRegion,start: i64,length: i64) -> i64 |
| 4118 | func fio_region_next(r: *NxFileReadRegion,out: *u8,cap: i64) -> i64 |
| 4153 | func fio_prepare_copy(source: *u8,candidate: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFilePrepareResult) -> i64 called by 1: fio_replace_owned calls 12: sys_mmapfio_region_initfio_region_opensys_openat_exclusivefio_region_nextsys_write+6 |
| 4214 | func fio_publish_candidate(candidate: *u8,live: *u8,out: *NxFilePublishResult) -> i64 |
| 4241 | func fio_target_lock_init(lock: *NxFileTargetLock) -> i64 |
| 4245 | func fio_target_lock_release(lock: *NxFileTargetLock) -> i64 |
| 4256 | func fio_target_lock_acquire(live: *u8,lock: *NxFileTargetLock) -> i64 called by 1: fio_replace_core calls 6: fio_target_lock_initsys_mmapsys_openat_locksys_munmapsys_flocksys_close |
| 4291 | func fio_replace_owned(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64 |
| 4317 | func fio_replace_init(out: *NxFileReplaceResult) -> i64 |
| 4324 | func fio_replace_core(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64 |
| 4333 | func fio_replace_with_backup(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFileReplaceResult) -> i64 calls 1: fio_replace_core |
| 4337 | func fio_replace_verified(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64 |
| 4350 | func fio_verify_sha256(path: *u8,expected: *u8,buffer: *u8,capacity: i64) -> i64 called by 1: fio_replace_owned calls 10: sys_mmapfio_region_initfio_region_opensha256_initfio_region_nextsha256_update+4 |
| 4406 | func ccz_cat_num(buf: *u8, off: i64, v: i64) -> i64 called by 1: nxi_fd |
| 4431 | func nxi_fd(fd: i64, v: i64) -> i64 |
| 4439 | func nxi_out(v: i64) -> i64 { return nxi_fd(NXI_STDOUT, v) } |
| 4440 | func nxi_err(v: i64) -> i64 { return nxi_fd(NXI_STDERR, v) } calls 1: nxi_fd |
| 4452 | func nxi_buf(dst: *u8, off: i64, v: i64) -> i64 |
| 4487 | func vw_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 4490 | func vw_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64 |
| 4504 | func vw_num_at(s: *u8, n: i64, off: i64, endp: *i64) -> i64 |
| 4520 | func vw_parse_row(buf: *u8, ls: i64, le: i64, outp: *i64) -> i64 |
| 4546 | func vw_status_kb(buf: *u8, n: i64, pat: *u8) -> i64 |
| 4569 | func vw_should_kill(vsz_kb: i64, max_gb: i64, last_kill_s: i64, now_s: i64, cooldown_s: i64) -> i64 |
| 4578 | func vw_read(path: *u8, buf: *u8, cap: i64) -> i64 called by 5: vw_selfpidvw_status_kb_offsx_conf_denyfsx_readfsx_read_lines calls 3: sys_openat_rdsys_readsys_close |
| 4589 | func vw_now_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] } |
| 4592 | func vw_selfpid() -> i64 |
| 4603 | func vw_vmsize_parse(buf: *u8, n: i64) -> i64 { return vw_status_kb(buf, n, "VmSize:" as *u8) } calls 1: vw_status_kb |
| 4607 | func vw_status_kb_of(dirname: *u8, label: *u8) -> i64 |
| 4628 | func vw_vmsize_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmSize:" as *u8) } calls 1: vw_status_kb_of |
| 4630 | func vw_rss_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmRSS:" as *u8) } calls 1: vw_status_kb_of |
| 4651 | func osf_under(path: *u8, root: *u8) -> i64 called by 1: osf_write_forbidden |
| 4662 | func osf_write_forbidden(path: *u8) -> i64 calls 1: osf_under |
| 4700 | func osp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (OSP_NUL as u8) { n = n + 1 } return n } called by 1: osp_list_pids |
| 4702 | func osp_itoa(v: i64, out: *u8) -> i64 |
| 4715 | func osp_num(buf: *u8, n: i64, off: i64, endp: *i64) -> i64 |
| 4726 | func osp_basename(s: *u8) -> *u8 called by 1: osp_cmd_argv0 |
| 4740 | func osp_bread(path: *u8, buf: *u8, cap: i64) -> i64 called by 4: osp_stat_fieldosp_cmd_argv0osp_selfpidosp_boot_epoch calls 3: sys_openat_rdsys_readsys_close |
| 4749 | func osp_ppath(out: *u8, pid: i64, leaf: *u8) -> i64 |
| 4761 | func osp_list_pids(pids: *i64, cap: i64) -> i64 |
| 4790 | func osp_fd_count_from_fd_result(fd: i64, cause: *i64) -> i64 |
| 4816 | func osp_fd_count_from_fd(fd: i64) -> i64 |
| 4819 | func osp_fd_count(pid: i64) -> i64 |
| 4831 | func osp_stat_field(pid: i64, fidx: i64) -> i64 |
| 4854 | func osp_ppid(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_PPID) } calls 1: osp_stat_field |
| 4855 | func osp_starttime_ticks(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_START) } calls 1: osp_stat_field |
| 4859 | func osp_cpu_ticks(pid: i64) -> i64 calls 1: osp_stat_field |
| 4867 | func osp_cmd_argv0(pid: i64, out: *u8, cap: i64) -> i64 |
| 4880 | func osp_hz() -> i64 { return OSP_HZ_LINUX } |
| 4883 | func osp_supervisor_log() -> *u8 { return "/tmp/supervisor.log" as *u8 } |
| 4884 | func osp_uptime_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] } |
| 4885 | func osp_selfpid() -> i64 |
| 4893 | func osp_boot_epoch() -> i64 |
| 4929 | func osp_stat_parent(buf: *u8, n: i64) -> i64 called by 1: osp_children |
| 4944 | func osp_children(parent: i64, children: *i64, capacity: i64) -> i64 |
| 5017 | func fsx_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 5022 | func fsx_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 5024 | func fsx_lower(s: *u8, out: *u8, cap: i64) -> i64 called by 1: fsx_denied |
| 5037 | func fsx_seq(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: fsx_cas_ok |
| 5048 | func fsx_cas_val(tok: *u8) -> *u8 called by 1: fsx_cas_ok |
| 5056 | func fsx_cas_ok(cur: i64, tok: *u8) -> i64 |
| 5072 | func fsx_deny_hit(lp: *u8, ln: i64, needle: *u8) -> i64 |
| 5079 | func fsx_conf_deny(lp: *u8, ln: i64, conf: *u8) -> i64 |
| 5102 | func fsx_isalnum(c: i64) -> i64 called by 1: fsx_word_has |
| 5109 | func fsx_ends_with(lp: *u8, ln: i64, suf: *u8) -> i64 |
| 5121 | func fsx_basename_is(lp: *u8, ln: i64, name: *u8) -> i64 |
| 5135 | func fsx_word_has(lp: *u8, ln: i64, w: *u8) -> i64 |
| 5160 | func fsx_content_secret(path: *u8) -> i64 |
| 5192 | func fsx_denied(path: *u8) -> i64 |
| 5236 | func fsx_fail(path: *u8, rc: i64) -> i64 |
| 5264 | func fsx_size(path: *u8) -> i64 |
| 5288 | func fsx_read(path: *u8, cap: i64) -> i64 |
| 5310 | func fsx_read_at(path: *u8, cap: i64, off: i64) -> i64 |
| 5347 | func fsx_read_lines(path: *u8, start: i64, count: i64) -> i64 |