code wiki / (root) / nx_shader_capture_owned_expanded_t218.nx

nx_shader_capture_owned_expanded_t218.nx

buildroot/runtime/nx_shader_capture_owned_expanded_t218.nx

262144 B5364 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind orphan librarytopic shader
docsdependenciesstructsconstsfunctions

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

2268struct NxBufDyn
2389struct NxBufOwned { buf:*u8, len:i64, cap:i64, }
3483struct Sha256 {
3980struct NxFileWriteResult
4062struct NxFileReadRegion
4144struct NxFilePrepareResult
4206struct NxFilePublishResult
4234struct NxFileTargetLock
4281struct NxFileReplaceResult

consts

223const NX_BUF_TINY: nx_size = 64
224const NX_BUF_SMALL: nx_size = 256
225const NX_BUF_MEDIUM: nx_size = 4096
226const NX_BUF_LARGE: nx_size = 65536
227const NX_BUF_HUGE: nx_size = 1048576
231const NX_TIER_MCU: nx_int = 0
232const NX_TIER_SOVEREIGN_CHIP: nx_int = 1
233const NX_TIER_FAMILY_DEVICE: nx_int = 2
234const NX_TIER_WORKSTATION: nx_int = 3
235const NX_TIER_SERVER: nx_int = 4
236const NX_TIER_HPC: nx_int = 5
240const NX_NUM_N0_I32: nx_int = 0
241const NX_NUM_N1_I64: nx_int = 1
242const NX_NUM_N2_I128: nx_int = 2
243const NX_NUM_N3_I256: nx_int = 3
244const NX_NUM_N4_I512: nx_int = 4
245const NX_NUM_N5_BIGINT: nx_int = 5
253const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes
254const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width
255const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size
259const NX_FD_STDIN: nx_fd = 0
260const NX_FD_STDOUT: nx_fd = 1
261const NX_FD_STDERR: nx_fd = 2
263const SYS_MAGIC_1024: i64 = 1024
264const SYS_MAGIC_1000000: i64 = 1000000
265const SYS_MAGIC_4294967296: i64 = 4294967296
267const SYS_READ_GROW_INIT: i64 = 65536
268const SYS_MAGIC_100000: i64 = 100000
286const SYS_READ: i64 = 0
287const SYS_WRITE: i64 = 1
288const SYS_CLOSE: i64 = 3
289const SYS_LSEEK: i64 = 8
290const SYS_OPENAT: i64 = 257
291const SYS_EXIT: i64 = 60
292const SYS_MMAP: i64 = 9
293const SYS_CLOCK_GETTIME: i64 = 228
294const SYS_IOCTL: i64 = 16
295const SYS_CLOCK_NANOSLEEP: i64 = 230
299const SYS_CHROOT: i64 = 161
300const SYS_MOUNT: i64 = 165
301const SYS_UNSHARE: i64 = 272
302const SYS_GETUID: i64 = 102
303const SYS_GETGID: i64 = 104
304const SYS_POLL: i64 = 7
308const SYS_READ: i64 = 63
309const SYS_WRITE: i64 = 64
310const SYS_CLOSE: i64 = 57
311const SYS_LSEEK: i64 = 62
312const SYS_OPENAT: i64 = 56
313const SYS_EXIT: i64 = 93
314const SYS_MMAP: i64 = 222
315const SYS_CLOCK_GETTIME: i64 = 113
316const SYS_IOCTL: i64 = 29
317const SYS_CLOCK_NANOSLEEP: i64 = 115
324const SYS_CHROOT: i64 = 51
325const SYS_MOUNT: i64 = 40
326const SYS_UNSHARE: i64 = 97
327const SYS_GETUID: i64 = 174
328const SYS_GETGID: i64 = 176
329const SYS_POLL: i64 = 73
387const SYS_PATH_MAX: i64 = 4096 // Linux PATH_MAX; getcwd returns -ERANGE below it
391const MODE_0755: i64 = 0x1ed // rwxr-xr-x : default mode for a created directory
406const AT_FDCWD: i64 = -100
511const NX_MO_RELAXED: i64 = 0
512const NX_MO_CONSUME: i64 = 1
513const NX_MO_ACQUIRE: i64 = 2
514const NX_MO_RELEASE: i64 = 3
515const NX_MO_ACQ_REL: i64 = 4
516const NX_MO_SEQ_CST: i64 = 5
518const NXA_SMALL_MAX: i64 = 256
519const NXA_CHUNK: i64 = 262144
520const NXA_ALIGN: i64 = 16
521const NXA_GAP: i64 = 16
522const NXA_STATE: i64 = 4096
528const NXA_RING: i64 = 128
529const NXA_RBASE: i64 = 64
564const NXA_LOCK: i64 = 4
572const NXA_LOCK_WARN: i64 = NXA_RING * 8
576const NXA_LOCK_WARNED: i64 = 5
578const NXA_CHUNKBASE: i64 = 320
579const NXA_CHUNKMAX: i64 = 192
600const NXA_MAP_INVALID:i64=0-22 // Linux EINVAL, a protocol value rather than a resource budget.
652const SYS_STATFS_X86_MEASURED: i64 = 137
653const STATFS_BUF_BYTES: i64 = 144
654const STATFS_I_BSIZE: i64 = 1
655const STATFS_I_BLOCKS: i64 = 2
656const STATFS_I_BAVAIL: i64 = 4
657const STATFS_PERMIL: i64 = 1000
658const STATFS_ERR: i64 = 0 - 1
1003const O_RDONLY: i64 = 0
1004const O_WRONLY_CT: i64 = 0x241 // O_CREAT | O_WRONLY | O_TRUNC
1005const O_WRONLY_CA: i64 = 0x441 // O_CREAT | O_WRONLY | O_APPEND
1013const O_RDWR_CREATE: i64 = 0x42
1034const MODE_0644: i64 = 0x1a4 // rw-r--r-- : default mode for a generated artifact
1039const MODE_0755: i64 = 0x1ed
1052const ACCEPT_TMO_S: i64 = 30
1059const O_WRONLY_CREATE_EXCLUSIVE: i64 = 0x1 | 0x40 | 0x80
1065const O_DIRECTORY: i64 = 0x10000
1079const O_CLOEXEC: i64 = 0x80000
1080const O_NOFOLLOW: i64 = 0x20000
1081const O_NONBLOCK: i64 = 0x800
1082const MODE_0600: i64 = 0x180
1147const SYS_LOCK_SH: i64 = 1
1148const SYS_LOCK_EX: i64 = 2
1149const SYS_LOCK_NB: i64 = 4
1150const SYS_LOCK_UN: i64 = 8
1195const SYS_SETPGID: i64 = 109
1198const SYS_SETPGID: i64 = 154
1221const RLIMIT_CPU: i64 = 0
1222const RLIMIT_AS: i64 = 9
1223const WNOHANG: i64 = 1
1317const SYS_CLONE: i64 = 56
1318const SYS_EXECVE: i64 = 59
1319const SYS_WAIT4: i64 = 61
1320const SYS_PIPE2: i64 = 293
1321const SYS_DUP3: i64 = 292
1325const SYS_CLONE: i64 = 220
1326const SYS_EXECVE: i64 = 221
1327const SYS_WAIT4: i64 = 260
1328const SYS_PIPE2: i64 = 59
1329const SYS_DUP3: i64 = 24
1335const CLONE_VM: i64 = 0x00000100
1336const CLONE_VFORK: i64 = 0x00004000
1337const SIGCHLD: i64 = 17
1387const NX_SYS_PRCTL: i64 = 167
1388const NX_PR_SET_PDEATHSIG: i64 = 1
1389const NX_PR_SET_CHILD_SUBREAPER: i64 = 36
1404const SYS_WAITID_PORTABLE: i64 = 95
1405const NX_WAIT_P_PID: i64 = 1
1406const NX_WAIT_EXITED: i64 = 4
1407const NX_WAIT_NOWAIT: i64 = 0x01000000
1408const NX_WAIT_SIGINFO_BYTES: i64 = 128
1415const NX_FD_DENT_BUFFER: i64 = 4096
1416const NX_SYS_CLOSE_RANGE: i64 = 436 // Linux x86_64 and asm-generic ABI
1417const NX_FD_UINT_MAX: i64 = 4294967295
1589const SYS_GETDENTS64: i64 = 217
1592const SYS_GETDENTS64: i64 = 61
1595const DT_UNKNOWN: i64 = 0
1596const DT_FIFO: i64 = 1
1597const DT_CHR: i64 = 2
1598const DT_DIR: i64 = 4
1599const DT_BLK: i64 = 6
1600const DT_REG: i64 = 8
1601const DT_LNK: i64 = 10
1602const DT_SOCK: i64 = 12
1790const SYS_SOCKET: i64 = 41
1791const SYS_BIND: i64 = 49
1792const SYS_LISTEN: i64 = 50
1793const SYS_ACCEPT: i64 = 43
1794const SYS_CONNECT: i64 = 42
1795const SYS_SETSOCKOPT: i64 = 54
1796const SYS_SENDTO: i64 = 44
1797const SYS_RECVFROM: i64 = 45
1798const SYS_SHUTDOWN: i64 = 48
1802const SYS_SOCKET: i64 = 198
1803const SYS_BIND: i64 = 200
1804const SYS_LISTEN: i64 = 201
1805const SYS_ACCEPT: i64 = 202
1806const SYS_CONNECT: i64 = 203
1807const SYS_SETSOCKOPT: i64 = 208
1808const SYS_SENDTO: i64 = 206
1809const SYS_RECVFROM: i64 = 207
1810const SYS_SHUTDOWN: i64 = 210
1814const SOL_SOCKET: i64 = 1
1815const SO_REUSEADDR: i64 = 2
1820const SO_SNDTIMEO: i64 = 21
1821const SO_RCVTIMEO: i64 = 20
1849const SYS_ALARM: i64 = 37
1852const AF_INET: i64 = 2
1853const SOCK_STREAM: i64 = 1
1854const SOCK_DGRAM: i64 = 2
1960const SYS_SENDMSG: i64 = 46
1961const SYS_RECVMSG: i64 = 47
1962const SYS_SOCKETPAIR: i64 = 53
1963const SCM_AF_UNIX: i64 = 1
1964const SCM_SOL_SOCKET: i64 = 1
1965const SCM_RIGHTS_TYPE: i64 = 1
1966const SCM_MSG_CMSG_CLOEXEC: i64 = 1073741824
1967const SCM_MSGHDR_BYTES: i64 = 56
1968const SCM_MSGHDR_OFF_IOV: i64 = 16
1969const SCM_MSGHDR_OFF_IOVLEN: i64 = 24
1970const SCM_MSGHDR_OFF_CTRL: i64 = 32
1971const SCM_MSGHDR_OFF_CTRLLEN: i64 = 40
1972const SCM_IOVEC_BYTES: i64 = 16
1973const SCM_IOVEC_OFF_BASE: i64 = 0
1974const SCM_IOVEC_OFF_LEN: i64 = 8
1975const SCM_CMSG_OFF_LEN: i64 = 0
1976const SCM_CMSG_OFF_LEVEL: i64 = 8
1977const SCM_CMSG_OFF_TYPE: i64 = 12
1978const SCM_CMSG_OFF_DATA: i64 = 16
1979const SCM_CMSG_LEN_1FD: i64 = 20
1980const SCM_CMSG_SPACE_1FD: i64 = 24
1981const SCM_IOV_COUNT_ONE: i64 = 1
1982const SCM_U32_BYTES: i64 = 4
1983const SCM_BYTE_RADIX: i64 = 256
1984const SCM_FDPAIR_BYTES: i64 = 8
1987const SCM_PAYLOAD_BYTES: i64 = 1
1988const SCM_PAYLOAD_BYTE: i64 = 70
1992const SCM_ERR_NO_CMSG: i64 = 0 - 901
1993const SCM_ERR_CMSG_LEN: i64 = 0 - 902
1994const SCM_ERR_CMSG_LEVEL: i64 = 0 - 903
1995const SCM_ERR_CMSG_TYPE: i64 = 0 - 904
2067const SCM_SUN_PATH_OFF: i64 = 2 // sockaddr_un = [sa_family: u16][sun_path: 108]
2068const SCM_SUN_BYTES: i64 = 110
2069const SCM_SUN_PATH_MAX: i64 = 107
2194const NX_FILE_PERMISSION_MASK:i64=511
2195const NX_FILE_DESCRIPTOR_INVALID:i64=0-22
2201const NX_STAT_X64_BYTES:i64=144
2202const NX_STAT_X64_MODE_OFFSET:i64=24
2203const NX_STAT_X64_BLOCK_OFFSET:i64=56
2204const NX_STAT_X64_SIZE_OFFSET:i64=48
2205const NX_STAT_X64_DEVICE_OFFSET:i64=0
2206const NX_STAT_X64_INODE_OFFSET:i64=8
2207const NX_STAT_TYPE_MASK:i64=61440
2208const NX_STAT_REGULAR_FILE:i64=32768
2274const NX_BD_BYTES: i64 = 24
2275const NX_BD_MIN_CAP: i64 = 64
2276const NX_BD_MIN_GROW: i64 = 64
2390const NX_BO_BYTES:i64=24
2391const NX_BO_I64_MAX:i64=9223372036854775807
2392const NX_BO_INVALID:i64=-100
2393const NX_BO_RANGE:i64=-101
2394const NX_BO_CAPACITY:i64=-102
2395const NX_BO_ALLOCATION:i64=-103
2396const NX_BO_ALIAS:i64=-104
2397const NX_BO_RELEASE:i64=-105
2437const TR_ERR_DRAIN: i64 = 0 - 8
2438const TR_ERR_FD_SETUP: i64 = 0 - 12
2439const TR_ERR_PARENT_LIFETIME: i64 = 0 - 11
2440const TR_DRAIN_BYTES: i64 = 4096
2442const TR_EINTR: i64 = 0 - 4
2444const TR_EINTR_MAX: i64 = 4096
2461const TR_EXIT_EXECFAIL: i64 = 127
2462const TR_MODE_0644: i64 = 420
2618const TR_ERR_TIMEOUT: i64 = 0 - 5
2619const TR_SIGKILL: i64 = 9
2652const TR_PROMOTE: i64 = 0 - 7 // distinct from TR_ERR_TIMEOUT (-5) and TR_ERR_CHDIR (-6)
2653const TR_POLLFD_BYTES: i64 = 8 // sizeof(struct pollfd)
2654const TR_POLLIN: i64 = 1 // POLLIN
2655const TR_PF_EV_OFF: i64 = 4 // offsetof(struct pollfd, events)
2656const TR_PF_RE_OFF: i64 = 6 // offsetof(struct pollfd, revents)
2657const TR_PF_FD_BYTES: i64 = 4 // sizeof(i32 fd)
2658const TR_BITS_PER_BYTE: i64 = 8
2659const TR_BYTE_MASK: i64 = 0xff
2755const TR_ERR_CHDIR: i64 = 0 - 6
2763const TR_FIT: i64 = 0
2764const TR_CUT: i64 = 1
2804const TR_CONTROL_BYTES: i64 = 4096
2805const TR_ERR_GROUP: i64 = 0 - 9
2806const TR_ERR_ALLOC: i64 = 0 - 10
2807const TR_ECHILD: i64 = 0 - 10 // Linux errno, distinct from the public result namespace
3481const K_MAGIC_536870912: i64 = 536870912
3520const M32: i64 = 0xFFFFFFFF
3898const SHA256_WORD_ALIGN: i64 = 8
3899const SHA256_BLOCK_BYTES: i64 = 64
3900const SHA256_ROUND_WORDS: i64 = 64
3901const SHA256_WIDE_WORD: i64 = 8
3902const SHA256_PACKED_WORD: i64 = 4
3903const SHA256_STATE_WORDS: i64 = 8
3904const SHA256_DIGEST_BYTES: i64 = 32
3905const SHA256_SIGNED_MAX: i64 = 9223372036854775807
3906const SHA256_BITS_PER_BYTE: i64 = 8
3907const SHA256_E_INPUT: i64 = 0-1
3908const SHA256_E_WORKSPACE: i64 = 0-2
3909const SHA256_E_MAPPING: i64 = 0-3
3910const SHA256_E_RELEASE: i64 = 0-4
3974const FIO_EINTR: i64 = 0 - 4
3975const FIO_EIO: i64 = 0 - 5
3976const FIO_EINVAL: i64 = 0 - 22
3977const FIO_EEXIST: i64 = 0 - 17
3978const FIO_EBADMSG: i64 = 0 - 74 // Linux ABI: artifact digest mismatch.
4403const CCZ_ASCII_0: i64 = 48
4404const CCZ_MINUS: i64 = 45
4405const CCZ_DEC: i64 = 10
4425const NXI_BUF: i64 = 24
4426const NXI_STDOUT: i64 = 1
4427const NXI_STDERR: i64 = 2
4483const VW_PROC_PATH_CAP: i64 = 256 // /proc/<pid>/status path buffer
4484const VW_STATUS_BUF: i64 = 8192 // /proc status read buffer
4485const VW_PTR_CELL: i64 = 16 // 2-i64 scratch cell (vw_num_at end-pointer out-param)
4648const OSF_SLASH: i64 = 47 // '/' -- path separator (namespace-boundary test)
4682const OSP_HZ_LINUX: i64 = 100 // Linux USER_HZ: /proc/<pid>/stat starttime ticks/sec
4683const OSP_PATH_CAP: i64 = 256
4684const OSP_RD_CAP: i64 = 4096
4685const OSP_STAT_CAP: i64 = 262144 // /proc/stat whole-file read cap (btime scan)
4686const OSP_DENT_BUF: i64 = 65536 // getdents64 batch buffer (proven sizing)
4687const OSP_F_PPID: i64 = 2 // /proc/<pid>/stat field after ')': state=1 ppid=2 ... utime=12 stime=13 ... starttime=20
4688const OSP_F_START: i64 = 20
4689const OSP_F_UTIME: i64 = 12 // user-mode CPU ticks (cumulative)
4690const OSP_F_STIME: i64 = 13 // kernel-mode CPU ticks (cumulative)
4691const OSP_ASCII_0: i64 = 48
4692const OSP_ASCII_9: i64 = 57
4693const OSP_SP: i64 = 32
4694const OSP_NL: i64 = 10
4695const OSP_RP: i64 = 41 // ')'
4696const OSP_SLASH: i64 = 47
4697const OSP_NUL: i64 = 0
4698const OSP_SENTINEL: i64 = 0 - 1 // "not available on this OS backend"
4928const OSP_DIRENT_NAME_OFFSET: i64 = 19 // Linux linux_dirent64 ABI
5003const FSX_MAGIC_4095: i64 = 4095
5005const FSX_READ_CAP: i64 = 1048576 // max bytes returned by `read` (truncation is MARKED, never silent)
5006const FSX_DENY_CAP: i64 = 8192 // fs_read_deny.conf read cap
5007const FSX_PATH_CAP: i64 = 1024 // lowercased path work buffer
5008const FSX_DENT_BUF: i64 = 65536 // getdents64 batch buffer (matches the proven vsz/heal sizing)
5009const FSX_LS_CAP: i64 = 200 // scale-law: max ls entries EMITTED; true total ALWAYS declared (65KB-dump fix)
5010const FSX_RC_ABSENT: i64 = 3 // exit: path absent/unreadable (mirrors nx_fileop's exists convention)
5011const FSX_RC_DENIED: i64 = 5 // exit: deny-list refused the read
5012const FSX_UPPER_A: i64 = 65 // 'A' (ASCII lowercasing)
5013const FSX_UPPER_Z: i64 = 90 // 'Z'
5014const FSX_CASE_OFF: i64 = 32 // 'a' - 'A'
5015const FSX_ASCII_0: i64 = 48 // '0' (decimal print)
5100const FSX_SNIFF_CAP: i64 = 4096
5249const FSX_SEEK_END: i64 = 2 // lseek whence: EOF offset = size, WITHOUT reading a single byte
5336const FSX_LINES_SCAN: i64 = 1048576 // line-addressing scan window (matches the proven read cap)
5337const FSX_LINES_MAXOUT: i64 = 262144 // max bytes emitted by one `lines` call (transport-friendly)
5338const FSX_LINES_DEFN: i64 = 40 // default line count when the caller omits it
5339const FSX_LINES_MAXN: i64 = 400 // max lines per call

functions

332func sys_ioctl(fd: i64, request: i64, arg: i64) -> i64
343func sys_poll(fds: *u8, nfds: i64, timeout_ms: i64) -> i64
349func sys_write(fd: i64, buf: *u8, count: i64) -> i64
353func sys_read(fd: i64, buf: *u8, count: i64) -> i64
357func sys_close(fd: i64) -> i64
367func sys_chdir(path: *u8) -> i64
called by 1: tr_run_capture_core_owned calls 1: sys_mmap
392func sys_getcwd(buf: *u8, cap: i64) -> i64
calls 1: sys_mmap
411func sys_unlinkat(path: *u8) -> i64
418func sys_fchmodat(path: *u8, mode: i64) -> i64
calls 1: sys_mmap
434func sys_exit_group(code: i64) -> i64
451func sys_setpriority(prio: i64) -> i64
459func sys_setpriority_of(pid: i64, prio: i64) -> i64
601func sys_munmap_direct(addr:*u8,len:i64)->i64
606func sys_munmap(addr: *u8, len: i64) -> i64
613func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64
661func sys_statfs(path: *u8, buf: *i64) -> i64
666func sys_fs_avail_bytes(path: *u8) -> i64
675func sys_fs_used_permil(path: *u8) -> i64
684func sys_exit(code: i64) -> i64
718func nxa_dump_printable(src: i64, n: i64) -> i64
called by 1: nxa_report_overrun calls 1: sys_write
739func nxa_dump_sizes() -> i64
called by 1: nxa_report_overrun calls 1: sys_write
764func nxa_report_overrun(sz: i64, gs: i64) -> i64
794func nxa_die(msg: *u8) -> i64
called by 1: sys_mmap calls 2: sys_writesys_exit
804func nxa_lock_addr() -> *i64
812func nxa_lock_take() -> i64
called by 1: sys_mmap calls 2: nxa_lock_addrsys_write
841func nxa_lock_give() -> i64
called by 1: sys_mmap calls 1: nxa_lock_addr
855func sys_mmap_try(size:i64)->*u8
called by 1: nx_bo_append
862func sys_mmap(size: i64) -> *u8
944func sys_arena_mark() -> i64
calls 1: sys_mmap
958func sys_arena_reset() -> i64
982func sys_mmap_shared(size: i64) -> *u8
996func sys_madvise(addr: *u8, len: i64, advice: i64) -> i64
1007func sys_openat_rd(path: *u8) -> i64
1014func sys_openat_rdwr(path: *u8, mode: i64) -> i64
1053func sys_openat_wr(path: *u8, mode: i64) -> i64
called by 1: tr_run_redirect
1060func sys_openat_exclusive(path: *u8, mode: i64) -> i64
called by 1: fio_prepare_copy
1066func sys_openat_directory(path: *u8) -> i64
1073func sys_openat_append(path: *u8, mode: i64) -> i64
1083func sys_openat_lock(path: *u8) -> i64
1091func sys_symlinkat(target: *u8, linkpath: *u8) -> i64
1103func sys_readlinkat(path: *u8, buf: *u8, cap: i64) -> i64
1120func sys_renameat(oldpath: *u8, newpath: *u8) -> i64
1133func sys_fsync(fd: i64) -> i64
1151func sys_flock(fd: i64, op: i64) -> i64
1159func sys_fstatat(path: *u8, statbuf: *u8) -> i64
called by 1: fio_exists
1166func sys_utimensat(path: *u8, times: *i64) -> i64
1185func nx_kill(pid: i64, sig: i64) -> i64 { return __syscall(129, pid, sig, 0, 0, 0, 0) }
1200func sys_setpgid(pid: i64, pgid: i64) -> i64 { return __syscall(SYS_SETPGID, pid, pgid, 0, 0, 0, 0) }
1214func nx_prlimit(pid: i64, resource: i64, new_limit: *u8, old_limit: *u8) -> i64
1226func sys_mkdir(path: *u8, mode: i64) -> i64 { return __syscall(34, AT_FDCWD, path, mode, 0, 0, 0) }
1229func nx_chmod(path: *u8, mode: i64) -> i64 { return __syscall(53, AT_FDCWD, path, mode, 0, 0, 0) }
called by 1: fio_prepare_copy
1233func nx_setsid() -> i64 { return __syscall(112, 0, 0, 0, 0, 0, 0) }
1237func sys_clock_gettime_mono(ts: *i64) -> i64
1245func sys_clock_gettime_real(ts: *i64) -> i64
1250func sys_now_realtime_sec() -> i64
1257func sys_now_realtime_ms() -> i64
1269func sys_now_realtime_us() -> i64
1278func sys_now_ms() -> i64
1289func sys_now_us() -> i64
1300func sys_clock_now_us() -> i64
calls 1: sys_now_us
1350func sys_unshare(flags: i64) -> i64
1353func sys_mount(source: *u8, target: *u8, fs_type: *u8, mountflags: i64, data: *u8) -> i64
1356func sys_chroot(path: *u8) -> i64
1359func sys_getuid() -> i64
1362func sys_getgid() -> i64
1366func sys_fork() -> i64
1390func sys_prctl(option: i64, arg: i64) -> i64
1393func sys_bind_parent_lifetime(expected_parent: i64, signal: i64) -> i64
1409func sys_waitid(idtype: i64, id: i64, info: *u8, options: i64) -> i64
called by 1: tr_observe_exit
1418func sys_close_inherited_proc(first: i64) -> i64
1459func sys_close_inherited(first: i64) -> i64
1465func sys_execve_clean(path: *u8, argv: *i64, envp: *i64) -> i64
1471func sys_execve(path: *u8, argv: *i64, envp: *i64) -> i64
called by 1: sys_execve_clean
1480func sys_wait4(pid: i64, status: *i64, options: i64) -> i64
1486func wait_exit_code(status: i64) -> i64
called by 1: wait_status_rc
1494func wait_term_signal(status: i64) -> i64
called by 1: wait_status_rc
1519func wait_status_rc(status: i64) -> i64
1542func sys_default_signal(sig: i64) -> i64
1551func sys_ignore_sigpipe() -> i64
calls 1: sys_mmap
1566func sys_pipe2(fds: *i64, flags: i64) -> i64
1572func sys_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64
1606func sys_getdents64(fd: i64, buf: *u8, buf_len: i64) -> i64
1612func dirent_reclen(rec: *u8) -> i64
1619func dirent_type(rec: *u8) -> i64
1624func dirent_name(rec: *u8) -> *u8
1631func sys_read_file(path: *u8, out_len: *i64) -> *u8
1713func sys_free_file(buf: *u8, len: i64) -> i64
calls 1: sys_munmap
1724func sys_map_file(path: *u8, out_len: *i64) -> *u8
1742func sys_sleep_ms(ms: i64) -> i64
1826func sys_setsockopt(fd: i64, level: i64, optname: i64,
1836func sys_set_socket_timeout(fd: i64, secs: i64) -> i64
1850func sys_alarm(secs: i64) -> i64 { return __syscall(SYS_ALARM, secs, 0, 0, 0, 0, 0) }
1856func sys_socket(domain: i64, sock_type: i64, protocol: i64) -> i64
1868func sockaddr_in_init(addr: *u8, port: i64) -> i64
1891func sys_bind(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_listen
1894func sys_listen(fd: i64, backlog: i64) -> i64
called by 1: sys_unix_listen
1901func sys_accept(fd: i64) -> i64
1904func sys_accept_with_addr(fd: i64, addr: *u8, addr_len: *i64) -> i64
1908func sys_shutdown(fd: i64, how: i64) -> i64
1911func sys_connect(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_connect_fd
1914func sys_sendto(fd: i64, buf: *u8, n: i64, flags: i64,
1918func sys_recvfrom(fd: i64, buf: *u8, n: i64, flags: i64,
1997func scm_zero(base: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { base[i] = 0; i = i + 1 } return 0 }
1998func scm_put_i64(base: *u8, off: i64, v: i64) -> i64
2003func scm_get_i64(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2010func scm_put_u32(base: *u8, off: i64, v: i64) -> i64
called by 1: sys_send_fd
2020func scm_get_u32(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2032func sys_sendmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_send_fd
2035func sys_recvmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_recv_fd
2059func sys_socketpair(domain: i64, sock_type: i64, protocol: i64, sv: *u8) -> i64
2070func sys_unix_listen(path: *u8, backlog: i64) -> i64
2098func sys_unix_connect_fd(path: *u8) -> i64
2122func sys_send_fd(sock: i64, fd: i64) -> i64
2156func sys_recv_fd(sock: i64, flags: i64) -> i64
2196func sys_fchmod_fd(fd:i64,mode:i64)->i64
2209func sys_fstat_fd(fd:i64,stat:*u8)->i64
2213func sys_stat_permissions(stat:*u8)->i64
2278func nx_bd_new(initial_cap: i64) -> *NxBufDyn
calls 1: sys_mmap
2290func nx_bd_grow(b: *NxBufDyn, extra: i64) -> i64
called by 2: nx_bd_bytenx_bd_bytes calls 1: sys_mmap
2307func nx_bd_byte(b: *NxBufDyn, v: i64) -> i64
2314func nx_bd_bytes(b: *NxBufDyn, src: *u8, n: i64) -> i64
calls 1: nx_bd_grow
2325func nx_bd_u16(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2330func nx_bd_u32(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2337func nx_bd_u64(b: *NxBufDyn, v: i64) -> i64
calls 1: nx_bd_byte
2347func nx_bd_str(b: *NxBufDyn, s: *u8) -> i64
calls 1: nx_bd_byte
2357func nx_bd_strz(b: *NxBufDyn, s: *u8) -> i64
calls 1: nx_bd_byte
2366func nx_bd_clear(b: *NxBufDyn) -> i64
2373func nx_bd_patch_u32(b: *NxBufDyn, off: i64, v: i64) -> i64
2398func nx_bo_state(b:*NxBufOwned)->i64
2405func nx_bo_append(b:*NxBufOwned,src:*u8,n:i64,max_bytes:i64)->i64
2427func nx_bo_release(b:*NxBufOwned)->i64
2464func tr_exec_failed(path: *u8) -> i64
2510func tr_run_redirect(path: *u8, argv: *i64, out_path: *u8, err_path: *u8) -> i64
2548func tr_run_capture(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64) -> i64
2623func tr_run_capture_to(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64
called by 1: tr_run1_to calls 1: tr_run_capture_tr
2660func tr_pollfd_set(p: *u8, fd: i64) -> i64
2672func tr_run_capture_deadline(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, deadline_ms: i64, out_pid: *i64, out_rfd: *i64) -> i64
2756func tr_run_capture_cwd(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, cwd: *u8) -> i64
2765func tr_drain_tr(rfd: i64, out: *u8, cap: i64, trunc: *i64) -> i64
2798func tr_run_capture_tr(path: *u8, argv: *i64, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64, trunc: *i64) -> i64
2808func tr_clock_ms(ts: *i64) -> i64
2813func tr_observe_exit(pid: i64, info: *u8) -> i64
2818func tr_reap(pid: i64, status: *i64) -> i64
2826func tr_drain_until(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64)->i64
2829func tr_drain_until_owned(rfd:i64,out:*u8,cap:i64,trunc:*i64,outlen:*i64,deadline:i64,owned:*NxBufOwned,max_bytes:i64)->i64
2882func tr_capture_stop(pid: i64, control: *i64) -> i64
2890func tr_watchdog_child(owner: i64, pid: i64, control: *i64, deadline: i64, wfd: i64, scratch: *u8) -> i64
2911func tr_watchdog_start(owner: i64, pid: i64, control: *i64, deadline: i64) -> i64
2938func tr_run_capture_core(path:*u8,argv:*i64,out:*u8,cap:i64,outlen:*i64,timeout_ms:i64,trunc:*i64,cwd:*u8)->i64
2943func tr_run_capture_owned(path:*u8,argv:*i64,owned:*NxBufOwned,timeout_ms:i64,max_bytes:i64,cwd:*u8)->i64
2949func 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
3029func tr_run1(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64) -> i64
3037func tr_run1_to(path: *u8, arg: *u8, out: *u8, cap: i64, outlen: *i64, timeout_ms: i64) -> i64
3045func tr_contains(buf: *u8, n: i64, needle: *u8) -> i64
3169func nx_bits_popcount64(x: i64) -> i64
3173func nx_bits_popcount32(x: i64) -> i64
3182func nx_bits_clz32(x: i64) -> i64
called by 1: nx_bits_floor_log2
3186func nx_bits_ctz32(x: i64) -> i64
3195func nx_bits_clz64(x: i64) -> i64
3201func nx_bits_ctz64(x: i64) -> i64
3214func nx_bits_rotl64(x: i64, n: i64) -> i64
3218func nx_bits_rotr64(x: i64, n: i64) -> i64
3228func nx_bits_rotl32(x: i64, n: i64) -> i64
called by 1: nx_bits_rotl32_soft
3235func nx_bits_rotr32(x: i64, n: i64) -> i64
3247func nx_bits_bswap64(x: i64) -> i64
3256func nx_bits_bswap32(x: i64) -> i64
3262func nx_bits_popcount64_soft(x: i64) -> i64
3270func nx_bits_popcount32_soft(x: i64) -> i64
3278func nx_bits_clz32_soft(x: i64) -> i64
3300func nx_bits_rotl64_soft(x: i64, n: i64) -> i64
3307func nx_bits_rotr64_soft(x: i64, n: i64) -> i64
3317func nx_bits_bswap64_soft(x: i64) -> i64
3325func nx_bits_bswap32_soft(x: i64) -> i64
3337func nx_bits_rotl32_soft(x: i64, n: i64) -> i64
calls 1: nx_bits_rotl32
3340func nx_bits_rotr32_soft(x: i64, n: i64) -> i64
calls 1: nx_bits_rotr32
3347func nx_bits_clz64_soft(x: i64) -> i64
3364func nx_bits_ctz64_soft(x: i64) -> i64
3380func nx_bits_ctz32_soft(x: i64) -> i64
3402func nx_bits_lowest(x: i64) -> i64
3412func nx_bits_clear_lowest(x: i64) -> i64
3420func nx_bits_is_pow2(x: i64) -> i64
3431func nx_bits_next_pow2_32(x: i64) -> i64
3447func nx_bits_parity64(x: i64) -> i64
3460func nx_bits_floor_log2(x: i64) -> i64
calls 1: nx_bits_clz32
3474func nx_bits_bextr(x: i64, start: i64, len: i64) -> i64
3524func rotr32(x: i64, n: i64) -> i64 {
calls 1: nx_bits_rotr32
3528func shr32(x: i64, n: i64) -> i64 {
3535func sha256_k(i: i64) -> i64 {
3605func blk_byte(c: *Sha256, n: i64) -> i64 {
called by 1: blk_word
3611func blk_set_byte(c: *Sha256, n: i64, v: i64) -> i64 {
3619func blk_word(c: *Sha256, i: i64) -> i64 {
called by 1: sha256_compress calls 1: blk_byte
3633func sha256_compress_ni(c: *Sha256) -> i64 {
called by 1: sha256_compress
3652func sha256_compress_ni_blocks(c: *Sha256, blocks: i64, nblk: i64) -> i64 {
called by 1: sha256_update
3674func sha256_compress(c: *Sha256) -> i64 {
3737func sha256_seed_allocated(c: *Sha256) -> i64 {
3764func sha256_init(c: *Sha256) -> i64 {
3775func sha256_update(c: *Sha256, bytes: *u8, n: i64) -> i64 {
3805func sha256_final(c: *Sha256, out: *u8) -> i64 {
3875func sha256_destroy(c: *Sha256) -> i64 {
3884func sha256_digest(bytes: *u8, n: i64, out: *u8) -> i64 {
3912func sha256_context_aligned_bytes() -> i64 {
3915func sha256_workspace_bytes() -> i64 {
3918func sha256_checked_input(bytes: *u8, n: i64, out: *u8) -> i64 {
3925func sha256_ranges_overlap(a: i64, an: i64, b: i64, bn: i64) -> i64 {
3931func sha256_init_workspace(workspace: *u8, capacity: i64) -> i64 {
3942func sha256_digest_workspace(bytes: *u8, n: i64, out: *u8, workspace: *u8, capacity: i64) -> i64 {
3956func sha256_digest_mapping_native(bytes: *u8, n: i64, out: *u8, mapping: i64) -> i64 {
3965func sha256_digest_checked_native(bytes: *u8, n: i64, out: *u8) -> i64 {
3989func fio_write_sync_fd(fd: i64, body: *u8, n: i64, result: *NxFileWriteResult) -> i64
4022func fio_sync_parent(path: *u8, result: *NxFileWriteResult) -> i64
4054func fio_exists(path: *u8) -> i64
4073func fio_region_init(r: *NxFileReadRegion) -> i64
4079func fio_region_close(r: *NxFileReadRegion) -> i64
4087func fio_region_fail(r: *NxFileReadRegion,stage: *u8,code: i64) -> i64
4092func fio_region_open(path: *u8,r: *NxFileReadRegion) -> i64
4108func fio_region_select(r: *NxFileReadRegion,start: i64,length: i64) -> i64
4118func fio_region_next(r: *NxFileReadRegion,out: *u8,cap: i64) -> i64
4153func fio_prepare_copy(source: *u8,candidate: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFilePrepareResult) -> i64
4214func fio_publish_candidate(candidate: *u8,live: *u8,out: *NxFilePublishResult) -> i64
4241func fio_target_lock_init(lock: *NxFileTargetLock) -> i64
4245func fio_target_lock_release(lock: *NxFileTargetLock) -> i64
called by 1: fio_replace_core calls 2: sys_flocksys_close
4256func fio_target_lock_acquire(live: *u8,lock: *NxFileTargetLock) -> i64
4291func 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
4317func fio_replace_init(out: *NxFileReplaceResult) -> i64
4324func 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
4333func fio_replace_with_backup(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFileReplaceResult) -> i64
4337func 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
4350func fio_verify_sha256(path: *u8,expected: *u8,buffer: *u8,capacity: i64) -> i64
4406func ccz_cat_num(buf: *u8, off: i64, v: i64) -> i64
called by 1: nxi_fd
4431func nxi_fd(fd: i64, v: i64) -> i64
4439func nxi_out(v: i64) -> i64 { return nxi_fd(NXI_STDOUT, v) }
called by 1: fsx_putn calls 1: nxi_fd
4440func nxi_err(v: i64) -> i64 { return nxi_fd(NXI_STDERR, v) }
calls 1: nxi_fd
4452func nxi_buf(dst: *u8, off: i64, v: i64) -> i64
4487func vw_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
4490func vw_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64
4504func vw_num_at(s: *u8, n: i64, off: i64, endp: *i64) -> i64
4520func vw_parse_row(buf: *u8, ls: i64, le: i64, outp: *i64) -> i64
4546func vw_status_kb(buf: *u8, n: i64, pat: *u8) -> i64
4569func vw_should_kill(vsz_kb: i64, max_gb: i64, last_kill_s: i64, now_s: i64, cooldown_s: i64) -> i64
4578func vw_read(path: *u8, buf: *u8, cap: i64) -> i64
4589func vw_now_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] }
4592func vw_selfpid() -> i64
4603func vw_vmsize_parse(buf: *u8, n: i64) -> i64 { return vw_status_kb(buf, n, "VmSize:" as *u8) }
calls 1: vw_status_kb
4607func vw_status_kb_of(dirname: *u8, label: *u8) -> i64
4628func vw_vmsize_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmSize:" as *u8) }
calls 1: vw_status_kb_of
4630func vw_rss_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmRSS:" as *u8) }
calls 1: vw_status_kb_of
4651func osf_under(path: *u8, root: *u8) -> i64
called by 1: osf_write_forbidden
4662func osf_write_forbidden(path: *u8) -> i64
calls 1: osf_under
4700func 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
4702func osp_itoa(v: i64, out: *u8) -> i64
called by 1: osp_ppath calls 1: sys_mmap
4715func osp_num(buf: *u8, n: i64, off: i64, endp: *i64) -> i64
4726func osp_basename(s: *u8) -> *u8
called by 1: osp_cmd_argv0
4740func osp_bread(path: *u8, buf: *u8, cap: i64) -> i64
4749func osp_ppath(out: *u8, pid: i64, leaf: *u8) -> i64
4761func osp_list_pids(pids: *i64, cap: i64) -> i64
4790func osp_fd_count_from_fd_result(fd: i64, cause: *i64) -> i64
4816func osp_fd_count_from_fd(fd: i64) -> i64
4819func osp_fd_count(pid: i64) -> i64
4831func osp_stat_field(pid: i64, fidx: i64) -> i64
4854func osp_ppid(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_PPID) }
calls 1: osp_stat_field
4855func osp_starttime_ticks(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_START) }
calls 1: osp_stat_field
4859func osp_cpu_ticks(pid: i64) -> i64
calls 1: osp_stat_field
4867func osp_cmd_argv0(pid: i64, out: *u8, cap: i64) -> i64
4880func osp_hz() -> i64 { return OSP_HZ_LINUX }
4883func osp_supervisor_log() -> *u8 { return "/tmp/supervisor.log" as *u8 }
4884func osp_uptime_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] }
4885func osp_selfpid() -> i64
4893func osp_boot_epoch() -> i64
4929func osp_stat_parent(buf: *u8, n: i64) -> i64
called by 1: osp_children
4944func osp_children(parent: i64, children: *i64, capacity: i64) -> i64
5017func 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 }
5022func fsx_putn(v: i64) -> i64 { nxi_out(v); return 0 }
5024func fsx_lower(s: *u8, out: *u8, cap: i64) -> i64
called by 1: fsx_denied
5037func 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
5048func fsx_cas_val(tok: *u8) -> *u8
called by 1: fsx_cas_ok
5056func fsx_cas_ok(cur: i64, tok: *u8) -> i64
5072func fsx_deny_hit(lp: *u8, ln: i64, needle: *u8) -> i64
5079func fsx_conf_deny(lp: *u8, ln: i64, conf: *u8) -> i64
5102func fsx_isalnum(c: i64) -> i64
called by 1: fsx_word_has
5109func fsx_ends_with(lp: *u8, ln: i64, suf: *u8) -> i64
called by 2: fsx_basename_isfsx_denied calls 1: vw_slen
5121func fsx_basename_is(lp: *u8, ln: i64, name: *u8) -> i64
called by 1: fsx_denied calls 2: vw_slenfsx_ends_with
5135func fsx_word_has(lp: *u8, ln: i64, w: *u8) -> i64
5160func fsx_content_secret(path: *u8) -> i64
5192func fsx_denied(path: *u8) -> i64
5236func fsx_fail(path: *u8, rc: i64) -> i64
5264func fsx_size(path: *u8) -> i64
5288func fsx_read(path: *u8, cap: i64) -> i64
5310func fsx_read_at(path: *u8, cap: i64, off: i64) -> i64
5347func fsx_read_lines(path: *u8, start: i64, count: i64) -> i64