code wiki / (root) / nx_surface_compatibility_expanded_r2_t207.nx

nx_surface_compatibility_expanded_r2_t207.nx

buildroot/runtime/nx_surface_compatibility_expanded_r2_t207.nx

262144 B5411 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind orphan librarytopic surface
docsdependenciesstructsconstsfunctions

about

One shader-capture owner for normal and explicitly selected staged builds. Digest checks bracket each execution; they detect changed files, not hostile swap-and-restore races. Native packaging by artifact reference; no publication or engine-acceptance claim. nx_fsops_lib.nx -- CONSOLIDATED filesystem tool (MCP name: nx_fs, tool #4 of the 15), LIBRARY half. (Source is named nx_fsops because nx_fs.nx is the safety-enveloped file-I/O STDLIB -- a different thing.) READ-ONLY first increment: `read` (bounded file read) + `ls` (typed dir listing). Retires ssh-cat for remote reads per rule 27 (api-first, no shell plumbing). BOUNDARY DEFENSE (rule 12 -- MCP callers are EXTERNAL input): `read` REFUSES any path that matches the secret DENY-LIST: compiled-in default needles (secret/key/token/passw/.pem, matched case-insensitively against the WHOLE path) plus data-driven extras from fs_read_deny.conf (one lowercase needle per line, CWD-relative -- rule 11: policy in data, not code). The tools-api runs where key material lives; an arbitrary-read tool that could return opaque_keys.bin or tools_cap_secret.key would convert a read-cap into a key-theft primitive. Over-blocking is the SAFE failure direction for v1. WRITE/EDIT increment (2026-07-16): fsx_write (ATOMIC tmp+fsync+rename) + fsx_edit (exact-string replace with the Claude-Edit UNIQUENESS contract). Exposed as the SEPARATE tools-api name `nx_fs_write` (its own cap class per knowledge/mcp/exposure_policy.txt: read=broad, write=cap) -- the `nx_fs` name stays read-only. The write DENY is a superset of the read deny (never clobber key material) PLUS the OS device/kernel/ firmware namespace via the nx_os_fs seam (rule 26 never-brick BY CONSTRUCTION -- not config-disableable) PLUS the tool-registry escalation surface ("allowlist") PLUS data-driven extras (fs_write_deny.conf). 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

2625struct Sha256 {
3122struct NxFileWriteResult
3204struct NxFileReadRegion
3286struct NxFilePrepareResult
3348struct NxFilePublishResult
3376struct NxFileTargetLock
3423struct NxFileReplaceResult
5313struct GpaWasmCursor
5318struct GpaMemory

consts

234const NX_BUF_TINY: nx_size = 64
235const NX_BUF_SMALL: nx_size = 256
236const NX_BUF_MEDIUM: nx_size = 4096
237const NX_BUF_LARGE: nx_size = 65536
238const NX_BUF_HUGE: nx_size = 1048576
242const NX_TIER_MCU: nx_int = 0
243const NX_TIER_SOVEREIGN_CHIP: nx_int = 1
244const NX_TIER_FAMILY_DEVICE: nx_int = 2
245const NX_TIER_WORKSTATION: nx_int = 3
246const NX_TIER_SERVER: nx_int = 4
247const NX_TIER_HPC: nx_int = 5
251const NX_NUM_N0_I32: nx_int = 0
252const NX_NUM_N1_I64: nx_int = 1
253const NX_NUM_N2_I128: nx_int = 2
254const NX_NUM_N3_I256: nx_int = 3
255const NX_NUM_N4_I512: nx_int = 4
256const NX_NUM_N5_BIGINT: nx_int = 5
264const NX_SIZEOF_NX_INT: nx_size = 8 // nx_int currently i64 -> 8 bytes
265const NX_SIZEOF_NX_SIZE: nx_size = 8 // nx_size always pointer-width
266const NX_SIZEOF_NX_IDX: nx_size = 8 // nx_idx alias of nx_size
270const NX_FD_STDIN: nx_fd = 0
271const NX_FD_STDOUT: nx_fd = 1
272const NX_FD_STDERR: nx_fd = 2
274const SYS_MAGIC_1024: i64 = 1024
275const SYS_MAGIC_1000000: i64 = 1000000
276const SYS_MAGIC_4294967296: i64 = 4294967296
278const SYS_READ_GROW_INIT: i64 = 65536
279const SYS_MAGIC_100000: i64 = 100000
297const SYS_READ: i64 = 0
298const SYS_WRITE: i64 = 1
299const SYS_CLOSE: i64 = 3
300const SYS_LSEEK: i64 = 8
301const SYS_OPENAT: i64 = 257
302const SYS_EXIT: i64 = 60
303const SYS_MMAP: i64 = 9
304const SYS_CLOCK_GETTIME: i64 = 228
305const SYS_IOCTL: i64 = 16
306const SYS_CLOCK_NANOSLEEP: i64 = 230
310const SYS_CHROOT: i64 = 161
311const SYS_MOUNT: i64 = 165
312const SYS_UNSHARE: i64 = 272
313const SYS_GETUID: i64 = 102
314const SYS_GETGID: i64 = 104
315const SYS_POLL: i64 = 7
319const SYS_READ: i64 = 63
320const SYS_WRITE: i64 = 64
321const SYS_CLOSE: i64 = 57
322const SYS_LSEEK: i64 = 62
323const SYS_OPENAT: i64 = 56
324const SYS_EXIT: i64 = 93
325const SYS_MMAP: i64 = 222
326const SYS_CLOCK_GETTIME: i64 = 113
327const SYS_IOCTL: i64 = 29
328const SYS_CLOCK_NANOSLEEP: i64 = 115
335const SYS_CHROOT: i64 = 51
336const SYS_MOUNT: i64 = 40
337const SYS_UNSHARE: i64 = 97
338const SYS_GETUID: i64 = 174
339const SYS_GETGID: i64 = 176
340const SYS_POLL: i64 = 73
398const SYS_PATH_MAX: i64 = 4096 // Linux PATH_MAX; getcwd returns -ERANGE below it
402const MODE_0755: i64 = 0x1ed // rwxr-xr-x : default mode for a created directory
417const AT_FDCWD: i64 = -100
522const NX_MO_RELAXED: i64 = 0
523const NX_MO_CONSUME: i64 = 1
524const NX_MO_ACQUIRE: i64 = 2
525const NX_MO_RELEASE: i64 = 3
526const NX_MO_ACQ_REL: i64 = 4
527const NX_MO_SEQ_CST: i64 = 5
529const NXA_SMALL_MAX: i64 = 256
530const NXA_CHUNK: i64 = 262144
531const NXA_ALIGN: i64 = 16
532const NXA_GAP: i64 = 16
533const NXA_STATE: i64 = 4096
539const NXA_RING: i64 = 128
540const NXA_RBASE: i64 = 64
575const NXA_LOCK: i64 = 4
583const NXA_LOCK_WARN: i64 = NXA_RING * 8
587const NXA_LOCK_WARNED: i64 = 5
589const NXA_CHUNKBASE: i64 = 320
590const NXA_CHUNKMAX: i64 = 192
611const NXA_MAP_INVALID:i64=0-22 // Linux EINVAL, a protocol value rather than a resource budget.
663const SYS_STATFS_X86_MEASURED: i64 = 137
664const STATFS_BUF_BYTES: i64 = 144
665const STATFS_I_BSIZE: i64 = 1
666const STATFS_I_BLOCKS: i64 = 2
667const STATFS_I_BAVAIL: i64 = 4
668const STATFS_PERMIL: i64 = 1000
669const STATFS_ERR: i64 = 0 - 1
1014const O_RDONLY: i64 = 0
1015const O_WRONLY_CT: i64 = 0x241 // O_CREAT | O_WRONLY | O_TRUNC
1016const O_WRONLY_CA: i64 = 0x441 // O_CREAT | O_WRONLY | O_APPEND
1024const O_RDWR_CREATE: i64 = 0x42
1045const MODE_0644: i64 = 0x1a4 // rw-r--r-- : default mode for a generated artifact
1050const MODE_0755: i64 = 0x1ed
1063const ACCEPT_TMO_S: i64 = 30
1070const O_WRONLY_CREATE_EXCLUSIVE: i64 = 0x1 | 0x40 | 0x80
1076const O_DIRECTORY: i64 = 0x10000
1090const O_CLOEXEC: i64 = 0x80000
1091const O_NOFOLLOW: i64 = 0x20000
1092const O_NONBLOCK: i64 = 0x800
1093const MODE_0600: i64 = 0x180
1158const SYS_LOCK_SH: i64 = 1
1159const SYS_LOCK_EX: i64 = 2
1160const SYS_LOCK_NB: i64 = 4
1161const SYS_LOCK_UN: i64 = 8
1206const SYS_SETPGID: i64 = 109
1209const SYS_SETPGID: i64 = 154
1232const RLIMIT_CPU: i64 = 0
1233const RLIMIT_AS: i64 = 9
1234const WNOHANG: i64 = 1
1328const SYS_CLONE: i64 = 56
1329const SYS_EXECVE: i64 = 59
1330const SYS_WAIT4: i64 = 61
1331const SYS_PIPE2: i64 = 293
1332const SYS_DUP3: i64 = 292
1336const SYS_CLONE: i64 = 220
1337const SYS_EXECVE: i64 = 221
1338const SYS_WAIT4: i64 = 260
1339const SYS_PIPE2: i64 = 59
1340const SYS_DUP3: i64 = 24
1346const CLONE_VM: i64 = 0x00000100
1347const CLONE_VFORK: i64 = 0x00004000
1348const SIGCHLD: i64 = 17
1398const NX_SYS_PRCTL: i64 = 167
1399const NX_PR_SET_PDEATHSIG: i64 = 1
1400const NX_PR_SET_CHILD_SUBREAPER: i64 = 36
1415const SYS_WAITID_PORTABLE: i64 = 95
1416const NX_WAIT_P_PID: i64 = 1
1417const NX_WAIT_EXITED: i64 = 4
1418const NX_WAIT_NOWAIT: i64 = 0x01000000
1419const NX_WAIT_SIGINFO_BYTES: i64 = 128
1426const NX_FD_DENT_BUFFER: i64 = 4096
1427const NX_SYS_CLOSE_RANGE: i64 = 436 // Linux x86_64 and asm-generic ABI
1428const NX_FD_UINT_MAX: i64 = 4294967295
1600const SYS_GETDENTS64: i64 = 217
1603const SYS_GETDENTS64: i64 = 61
1606const DT_UNKNOWN: i64 = 0
1607const DT_FIFO: i64 = 1
1608const DT_CHR: i64 = 2
1609const DT_DIR: i64 = 4
1610const DT_BLK: i64 = 6
1611const DT_REG: i64 = 8
1612const DT_LNK: i64 = 10
1613const DT_SOCK: i64 = 12
1801const SYS_SOCKET: i64 = 41
1802const SYS_BIND: i64 = 49
1803const SYS_LISTEN: i64 = 50
1804const SYS_ACCEPT: i64 = 43
1805const SYS_CONNECT: i64 = 42
1806const SYS_SETSOCKOPT: i64 = 54
1807const SYS_SENDTO: i64 = 44
1808const SYS_RECVFROM: i64 = 45
1809const SYS_SHUTDOWN: i64 = 48
1813const SYS_SOCKET: i64 = 198
1814const SYS_BIND: i64 = 200
1815const SYS_LISTEN: i64 = 201
1816const SYS_ACCEPT: i64 = 202
1817const SYS_CONNECT: i64 = 203
1818const SYS_SETSOCKOPT: i64 = 208
1819const SYS_SENDTO: i64 = 206
1820const SYS_RECVFROM: i64 = 207
1821const SYS_SHUTDOWN: i64 = 210
1825const SOL_SOCKET: i64 = 1
1826const SO_REUSEADDR: i64 = 2
1831const SO_SNDTIMEO: i64 = 21
1832const SO_RCVTIMEO: i64 = 20
1860const SYS_ALARM: i64 = 37
1863const AF_INET: i64 = 2
1864const SOCK_STREAM: i64 = 1
1865const SOCK_DGRAM: i64 = 2
1971const SYS_SENDMSG: i64 = 46
1972const SYS_RECVMSG: i64 = 47
1973const SYS_SOCKETPAIR: i64 = 53
1974const SCM_AF_UNIX: i64 = 1
1975const SCM_SOL_SOCKET: i64 = 1
1976const SCM_RIGHTS_TYPE: i64 = 1
1977const SCM_MSG_CMSG_CLOEXEC: i64 = 1073741824
1978const SCM_MSGHDR_BYTES: i64 = 56
1979const SCM_MSGHDR_OFF_IOV: i64 = 16
1980const SCM_MSGHDR_OFF_IOVLEN: i64 = 24
1981const SCM_MSGHDR_OFF_CTRL: i64 = 32
1982const SCM_MSGHDR_OFF_CTRLLEN: i64 = 40
1983const SCM_IOVEC_BYTES: i64 = 16
1984const SCM_IOVEC_OFF_BASE: i64 = 0
1985const SCM_IOVEC_OFF_LEN: i64 = 8
1986const SCM_CMSG_OFF_LEN: i64 = 0
1987const SCM_CMSG_OFF_LEVEL: i64 = 8
1988const SCM_CMSG_OFF_TYPE: i64 = 12
1989const SCM_CMSG_OFF_DATA: i64 = 16
1990const SCM_CMSG_LEN_1FD: i64 = 20
1991const SCM_CMSG_SPACE_1FD: i64 = 24
1992const SCM_IOV_COUNT_ONE: i64 = 1
1993const SCM_U32_BYTES: i64 = 4
1994const SCM_BYTE_RADIX: i64 = 256
1995const SCM_FDPAIR_BYTES: i64 = 8
1998const SCM_PAYLOAD_BYTES: i64 = 1
1999const SCM_PAYLOAD_BYTE: i64 = 70
2003const SCM_ERR_NO_CMSG: i64 = 0 - 901
2004const SCM_ERR_CMSG_LEN: i64 = 0 - 902
2005const SCM_ERR_CMSG_LEVEL: i64 = 0 - 903
2006const SCM_ERR_CMSG_TYPE: i64 = 0 - 904
2078const SCM_SUN_PATH_OFF: i64 = 2 // sockaddr_un = [sa_family: u16][sun_path: 108]
2079const SCM_SUN_BYTES: i64 = 110
2080const SCM_SUN_PATH_MAX: i64 = 107
2623const K_MAGIC_536870912: i64 = 536870912
2662const M32: i64 = 0xFFFFFFFF
3040const SHA256_WORD_ALIGN: i64 = 8
3041const SHA256_BLOCK_BYTES: i64 = 64
3042const SHA256_ROUND_WORDS: i64 = 64
3043const SHA256_WIDE_WORD: i64 = 8
3044const SHA256_PACKED_WORD: i64 = 4
3045const SHA256_STATE_WORDS: i64 = 8
3046const SHA256_DIGEST_BYTES: i64 = 32
3047const SHA256_SIGNED_MAX: i64 = 9223372036854775807
3048const SHA256_BITS_PER_BYTE: i64 = 8
3049const SHA256_E_INPUT: i64 = 0-1
3050const SHA256_E_WORKSPACE: i64 = 0-2
3051const SHA256_E_MAPPING: i64 = 0-3
3052const SHA256_E_RELEASE: i64 = 0-4
3116const FIO_EINTR: i64 = 0 - 4
3117const FIO_EIO: i64 = 0 - 5
3118const FIO_EINVAL: i64 = 0 - 22
3119const FIO_EEXIST: i64 = 0 - 17
3120const FIO_EBADMSG: i64 = 0 - 74 // Linux ABI: artifact digest mismatch.
3545const CCZ_ASCII_0: i64 = 48
3546const CCZ_MINUS: i64 = 45
3547const CCZ_DEC: i64 = 10
3567const NXI_BUF: i64 = 24
3568const NXI_STDOUT: i64 = 1
3569const NXI_STDERR: i64 = 2
3625const VW_PROC_PATH_CAP: i64 = 256 // /proc/<pid>/status path buffer
3626const VW_STATUS_BUF: i64 = 8192 // /proc status read buffer
3627const VW_PTR_CELL: i64 = 16 // 2-i64 scratch cell (vw_num_at end-pointer out-param)
3790const OSF_SLASH: i64 = 47 // '/' -- path separator (namespace-boundary test)
3824const OSP_HZ_LINUX: i64 = 100 // Linux USER_HZ: /proc/<pid>/stat starttime ticks/sec
3825const OSP_PATH_CAP: i64 = 256
3826const OSP_RD_CAP: i64 = 4096
3827const OSP_STAT_CAP: i64 = 262144 // /proc/stat whole-file read cap (btime scan)
3828const OSP_DENT_BUF: i64 = 65536 // getdents64 batch buffer (proven sizing)
3829const OSP_F_PPID: i64 = 2 // /proc/<pid>/stat field after ')': state=1 ppid=2 ... utime=12 stime=13 ... starttime=20
3830const OSP_F_START: i64 = 20
3831const OSP_F_UTIME: i64 = 12 // user-mode CPU ticks (cumulative)
3832const OSP_F_STIME: i64 = 13 // kernel-mode CPU ticks (cumulative)
3833const OSP_ASCII_0: i64 = 48
3834const OSP_ASCII_9: i64 = 57
3835const OSP_SP: i64 = 32
3836const OSP_NL: i64 = 10
3837const OSP_RP: i64 = 41 // ')'
3838const OSP_SLASH: i64 = 47
3839const OSP_NUL: i64 = 0
3840const OSP_SENTINEL: i64 = 0 - 1 // "not available on this OS backend"
4070const OSP_DIRENT_NAME_OFFSET: i64 = 19 // Linux linux_dirent64 ABI
4145const FSX_MAGIC_4095: i64 = 4095
4147const FSX_READ_CAP: i64 = 1048576 // max bytes returned by `read` (truncation is MARKED, never silent)
4148const FSX_DENY_CAP: i64 = 8192 // fs_read_deny.conf read cap
4149const FSX_PATH_CAP: i64 = 1024 // lowercased path work buffer
4150const FSX_DENT_BUF: i64 = 65536 // getdents64 batch buffer (matches the proven vsz/heal sizing)
4151const FSX_LS_CAP: i64 = 200 // scale-law: max ls entries EMITTED; true total ALWAYS declared (65KB-dump fix)
4152const FSX_RC_ABSENT: i64 = 3 // exit: path absent/unreadable (mirrors nx_fileop's exists convention)
4153const FSX_RC_DENIED: i64 = 5 // exit: deny-list refused the read
4154const FSX_UPPER_A: i64 = 65 // 'A' (ASCII lowercasing)
4155const FSX_UPPER_Z: i64 = 90 // 'Z'
4156const FSX_CASE_OFF: i64 = 32 // 'a' - 'A'
4157const FSX_ASCII_0: i64 = 48 // '0' (decimal print)
4242const FSX_SNIFF_CAP: i64 = 4096
4391const FSX_SEEK_END: i64 = 2 // lseek whence: EOF offset = size, WITHOUT reading a single byte
4478const FSX_LINES_SCAN: i64 = 1048576 // line-addressing scan window (matches the proven read cap)
4479const FSX_LINES_MAXOUT: i64 = 262144 // max bytes emitted by one `lines` call (transport-friendly)
4480const FSX_LINES_DEFN: i64 = 40 // default line count when the caller omits it
4481const FSX_LINES_MAXN: i64 = 400 // max lines per call
4551const FSX_MODE_RW: i64 = MODE_0644 // 0644 -- the ecosystem's file-create mode idiom
4552const FSX_DEC: i64 = 10 // decimal base (pid rendering in the tmp suffix)
4553const FSX_EDIT_OUT: i64 = 2097152 // edit output buffer (2x read cap: bounded replacement growth)
4554const FSX_TMP_ROOM: i64 = 32 // reserved room for ".nxw" + pid digits + NUL in the tmp name
4555const FSX_RC_IO: i64 = 4 // exit: io failure (open/short-write/rename)
4556const FSX_RC_NOMATCH: i64 = 6 // exit: edit found 0 occurrences (file UNCHANGED)
4557const FSX_RC_AMBIG: i64 = 7 // exit: edit found >1 occurrences without `all` (file UNCHANGED)
4670const FSX_NL: i64 = 10 // '\n' -- the row terminator this verb requires and heals
4671const FSX_APP_EMPTY: i64 = 0 - 4 // append refused: nothing to append
4672const FSX_APP_NONL: i64 = 0 - 5 // append refused: body does not end in a newline
4673const FSX_SEEK_SET: i64 = 0 // lseek whence: absolute offset (the tail probe)
4970const FSX_JOB_DIR: *u8 = "_jobs/"
4971const FSX_JOB_PFX: *u8 = "job_"
4972const FSX_JOB_CLAIM: *u8 = ".claim"
4973const FSX_JOB_OUT: *u8 = ".out"
4974const FSX_JOB_IDMAX: i64 = 24 // a job id is an epoch-shaped integer; longer than this is not an id
4975const FSX_JOB_NOSUCH: i64 = 1 // no marker: the id was never claimed (unknown id, or the lane has not claimed it yet)
4976const FSX_JOB_RUNNING: i64 = 2 // marker reads state=CLAIMED
4977const FSX_JOB_DONE: i64 = 3 // marker reads state=DONE with bytes>0: the output was printed
4978const FSX_JOB_DONE_EMPTY: i64 = 4 // marker reads state=DONE with bytes=0: the tool produced NOTHING
4979const FSX_JOB_UNPARSED: i64 = 5 // marker present, no state token this reader knows: printed verbatim
4980const FSX_JOB_REFUSED: i64 = 6 // id is not digits-only
4981const FSX_JOB_OUT_ABSENT: i64 = 7 // marker says DONE with bytes>0 but the output file is unreadable
4982const FSX_RC_JOB_RUNNING: i64 = 8 // CLI exit for RUNNING, distinct from every other fs exit code
4983const FSX_ASCII_9: i64 = 57 // '9' (decimal parse upper bound)
5093const FXC_OPEN_EXCLUSIVE: i64 = 0xc1 // O_WRONLY | O_CREAT | O_EXCL
5094const FXC_RENAMEAT2_X86: i64 = 316
5095const FXC_RENAME_NOREPLACE: i64 = 1
5096const FXC_EXISTS: i64 = 0 - 17
5097const FXC_IO: i64 = 0 - 3
5186const B64_PAD: i64 = 0x3D // '='
5311const GPA_HEADER_BYTES: i64 = 8

functions

343func sys_ioctl(fd: i64, request: i64, arg: i64) -> i64
354func sys_poll(fds: *u8, nfds: i64, timeout_ms: i64) -> i64
360func sys_write(fd: i64, buf: *u8, count: i64) -> i64
364func sys_read(fd: i64, buf: *u8, count: i64) -> i64
368func sys_close(fd: i64) -> i64
378func sys_chdir(path: *u8) -> i64
calls 1: sys_mmap
403func sys_getcwd(buf: *u8, cap: i64) -> i64
calls 1: sys_mmap
422func sys_unlinkat(path: *u8) -> i64
called by 2: fsx_writefxc_create
429func sys_fchmodat(path: *u8, mode: i64) -> i64
calls 1: sys_mmap
445func sys_exit_group(code: i64) -> i64
462func sys_setpriority(prio: i64) -> i64
470func sys_setpriority_of(pid: i64, prio: i64) -> i64
612func sys_munmap_direct(addr:*u8,len:i64)->i64
617func sys_munmap(addr: *u8, len: i64) -> i64
624func sys_lseek(fd: i64, offset: i64, whence: i64) -> i64
672func sys_statfs(path: *u8, buf: *i64) -> i64
677func sys_fs_avail_bytes(path: *u8) -> i64
686func sys_fs_used_permil(path: *u8) -> i64
695func sys_exit(code: i64) -> i64
called by 1: nxa_die
729func nxa_dump_printable(src: i64, n: i64) -> i64
called by 1: nxa_report_overrun calls 1: sys_write
750func nxa_dump_sizes() -> i64
called by 1: nxa_report_overrun calls 1: sys_write
775func nxa_report_overrun(sz: i64, gs: i64) -> i64
805func nxa_die(msg: *u8) -> i64
called by 1: sys_mmap calls 2: sys_writesys_exit
815func nxa_lock_addr() -> *i64
823func nxa_lock_take() -> i64
called by 1: sys_mmap calls 2: nxa_lock_addrsys_write
852func nxa_lock_give() -> i64
called by 1: sys_mmap calls 1: nxa_lock_addr
866func sys_mmap_try(size:i64)->*u8
873func sys_mmap(size: i64) -> *u8
955func sys_arena_mark() -> i64
calls 1: sys_mmap
969func sys_arena_reset() -> i64
993func sys_mmap_shared(size: i64) -> *u8
1007func sys_madvise(addr: *u8, len: i64, advice: i64) -> i64
1018func sys_openat_rd(path: *u8) -> i64
1025func sys_openat_rdwr(path: *u8, mode: i64) -> i64
1064func sys_openat_wr(path: *u8, mode: i64) -> i64
called by 1: fsx_write
1071func sys_openat_exclusive(path: *u8, mode: i64) -> i64
called by 1: fio_prepare_copy
1077func sys_openat_directory(path: *u8) -> i64
1084func sys_openat_append(path: *u8, mode: i64) -> i64
called by 1: fsx_append
1094func sys_openat_lock(path: *u8) -> i64
1102func sys_symlinkat(target: *u8, linkpath: *u8) -> i64
1114func sys_readlinkat(path: *u8, buf: *u8, cap: i64) -> i64
1131func sys_renameat(oldpath: *u8, newpath: *u8) -> i64
1144func sys_fsync(fd: i64) -> i64
1162func sys_flock(fd: i64, op: i64) -> i64
1170func sys_fstatat(path: *u8, statbuf: *u8) -> i64
called by 2: fio_existsfsx_write
1177func sys_utimensat(path: *u8, times: *i64) -> i64
1196func nx_kill(pid: i64, sig: i64) -> i64 { return __syscall(129, pid, sig, 0, 0, 0, 0) }
1211func sys_setpgid(pid: i64, pgid: i64) -> i64 { return __syscall(SYS_SETPGID, pid, pgid, 0, 0, 0, 0) }
1225func nx_prlimit(pid: i64, resource: i64, new_limit: *u8, old_limit: *u8) -> i64
1237func sys_mkdir(path: *u8, mode: i64) -> i64 { return __syscall(34, AT_FDCWD, path, mode, 0, 0, 0) }
1240func nx_chmod(path: *u8, mode: i64) -> i64 { return __syscall(53, AT_FDCWD, path, mode, 0, 0, 0) }
1244func nx_setsid() -> i64 { return __syscall(112, 0, 0, 0, 0, 0, 0) }
1248func sys_clock_gettime_mono(ts: *i64) -> i64
1256func sys_clock_gettime_real(ts: *i64) -> i64
1261func sys_now_realtime_sec() -> i64
1268func sys_now_realtime_ms() -> i64
1280func sys_now_realtime_us() -> i64
1289func sys_now_ms() -> i64
1300func sys_now_us() -> i64
1311func sys_clock_now_us() -> i64
calls 1: sys_now_us
1361func sys_unshare(flags: i64) -> i64
1364func sys_mount(source: *u8, target: *u8, fs_type: *u8, mountflags: i64, data: *u8) -> i64
1367func sys_chroot(path: *u8) -> i64
1370func sys_getuid() -> i64
1373func sys_getgid() -> i64
1377func sys_fork() -> i64
1401func sys_prctl(option: i64, arg: i64) -> i64
1404func sys_bind_parent_lifetime(expected_parent: i64, signal: i64) -> i64
calls 1: sys_prctl
1420func sys_waitid(idtype: i64, id: i64, info: *u8, options: i64) -> i64
1429func sys_close_inherited_proc(first: i64) -> i64
1470func sys_close_inherited(first: i64) -> i64
1476func sys_execve_clean(path: *u8, argv: *i64, envp: *i64) -> i64
1482func sys_execve(path: *u8, argv: *i64, envp: *i64) -> i64
called by 1: sys_execve_clean
1491func sys_wait4(pid: i64, status: *i64, options: i64) -> i64
1497func wait_exit_code(status: i64) -> i64
called by 1: wait_status_rc
1505func wait_term_signal(status: i64) -> i64
called by 1: wait_status_rc
1530func wait_status_rc(status: i64) -> i64
1553func sys_default_signal(sig: i64) -> i64
calls 1: sys_mmap
1562func sys_ignore_sigpipe() -> i64
calls 1: sys_mmap
1577func sys_pipe2(fds: *i64, flags: i64) -> i64
1583func sys_dup3(oldfd: i64, newfd: i64, flags: i64) -> i64
1617func sys_getdents64(fd: i64, buf: *u8, buf_len: i64) -> i64
1623func dirent_reclen(rec: *u8) -> i64
1630func dirent_type(rec: *u8) -> i64
called by 1: fsx_ls_from
1635func dirent_name(rec: *u8) -> *u8
1642func sys_read_file(path: *u8, out_len: *i64) -> *u8
1724func sys_free_file(buf: *u8, len: i64) -> i64
calls 1: sys_munmap
1735func sys_map_file(path: *u8, out_len: *i64) -> *u8
1753func sys_sleep_ms(ms: i64) -> i64
1837func sys_setsockopt(fd: i64, level: i64, optname: i64,
1847func sys_set_socket_timeout(fd: i64, secs: i64) -> i64
1861func sys_alarm(secs: i64) -> i64 { return __syscall(SYS_ALARM, secs, 0, 0, 0, 0, 0) }
1867func sys_socket(domain: i64, sock_type: i64, protocol: i64) -> i64
1879func sockaddr_in_init(addr: *u8, port: i64) -> i64
1902func sys_bind(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_listen
1905func sys_listen(fd: i64, backlog: i64) -> i64
called by 1: sys_unix_listen
1912func sys_accept(fd: i64) -> i64
1915func sys_accept_with_addr(fd: i64, addr: *u8, addr_len: *i64) -> i64
1919func sys_shutdown(fd: i64, how: i64) -> i64
1922func sys_connect(fd: i64, addr: *u8, addr_len: i64) -> i64
called by 1: sys_unix_connect_fd
1925func sys_sendto(fd: i64, buf: *u8, n: i64, flags: i64,
1929func sys_recvfrom(fd: i64, buf: *u8, n: i64, flags: i64,
2008func scm_zero(base: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { base[i] = 0; i = i + 1 } return 0 }
2009func scm_put_i64(base: *u8, off: i64, v: i64) -> i64
2014func scm_get_i64(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2021func scm_put_u32(base: *u8, off: i64, v: i64) -> i64
called by 1: sys_send_fd
2031func scm_get_u32(base: *u8, off: i64) -> i64
called by 1: sys_recv_fd
2043func sys_sendmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_send_fd
2046func sys_recvmsg(fd: i64, msg: *u8, flags: i64) -> i64
called by 1: sys_recv_fd
2070func sys_socketpair(domain: i64, sock_type: i64, protocol: i64, sv: *u8) -> i64
2081func sys_unix_listen(path: *u8, backlog: i64) -> i64
2109func sys_unix_connect_fd(path: *u8) -> i64
2133func sys_send_fd(sock: i64, fd: i64) -> i64
2167func sys_recv_fd(sock: i64, flags: i64) -> i64
2311func nx_bits_popcount64(x: i64) -> i64
2315func nx_bits_popcount32(x: i64) -> i64
2324func nx_bits_clz32(x: i64) -> i64
called by 1: nx_bits_floor_log2
2328func nx_bits_ctz32(x: i64) -> i64
2337func nx_bits_clz64(x: i64) -> i64
2343func nx_bits_ctz64(x: i64) -> i64
2356func nx_bits_rotl64(x: i64, n: i64) -> i64
2360func nx_bits_rotr64(x: i64, n: i64) -> i64
2370func nx_bits_rotl32(x: i64, n: i64) -> i64
called by 1: nx_bits_rotl32_soft
2377func nx_bits_rotr32(x: i64, n: i64) -> i64
2389func nx_bits_bswap64(x: i64) -> i64
2398func nx_bits_bswap32(x: i64) -> i64
2404func nx_bits_popcount64_soft(x: i64) -> i64
2412func nx_bits_popcount32_soft(x: i64) -> i64
2420func nx_bits_clz32_soft(x: i64) -> i64
2442func nx_bits_rotl64_soft(x: i64, n: i64) -> i64
2449func nx_bits_rotr64_soft(x: i64, n: i64) -> i64
2459func nx_bits_bswap64_soft(x: i64) -> i64
2467func nx_bits_bswap32_soft(x: i64) -> i64
2479func nx_bits_rotl32_soft(x: i64, n: i64) -> i64
calls 1: nx_bits_rotl32
2482func nx_bits_rotr32_soft(x: i64, n: i64) -> i64
calls 1: nx_bits_rotr32
2489func nx_bits_clz64_soft(x: i64) -> i64
2506func nx_bits_ctz64_soft(x: i64) -> i64
2522func nx_bits_ctz32_soft(x: i64) -> i64
2544func nx_bits_lowest(x: i64) -> i64
2554func nx_bits_clear_lowest(x: i64) -> i64
2562func nx_bits_is_pow2(x: i64) -> i64
2573func nx_bits_next_pow2_32(x: i64) -> i64
2589func nx_bits_parity64(x: i64) -> i64
2602func nx_bits_floor_log2(x: i64) -> i64
calls 1: nx_bits_clz32
2616func nx_bits_bextr(x: i64, start: i64, len: i64) -> i64
2666func rotr32(x: i64, n: i64) -> i64 {
calls 1: nx_bits_rotr32
2670func shr32(x: i64, n: i64) -> i64 {
2677func sha256_k(i: i64) -> i64 {
2747func blk_byte(c: *Sha256, n: i64) -> i64 {
called by 1: blk_word
2753func blk_set_byte(c: *Sha256, n: i64, v: i64) -> i64 {
2761func blk_word(c: *Sha256, i: i64) -> i64 {
called by 1: sha256_compress calls 1: blk_byte
2775func sha256_compress_ni(c: *Sha256) -> i64 {
called by 1: sha256_compress
2794func sha256_compress_ni_blocks(c: *Sha256, blocks: i64, nblk: i64) -> i64 {
called by 1: sha256_update
2816func sha256_compress(c: *Sha256) -> i64 {
2879func sha256_seed_allocated(c: *Sha256) -> i64 {
2906func sha256_init(c: *Sha256) -> i64 {
2917func sha256_update(c: *Sha256, bytes: *u8, n: i64) -> i64 {
2947func sha256_final(c: *Sha256, out: *u8) -> i64 {
3017func sha256_destroy(c: *Sha256) -> i64 {
3026func sha256_digest(bytes: *u8, n: i64, out: *u8) -> i64 {
3054func sha256_context_aligned_bytes() -> i64 {
3057func sha256_workspace_bytes() -> i64 {
3060func sha256_checked_input(bytes: *u8, n: i64, out: *u8) -> i64 {
3067func sha256_ranges_overlap(a: i64, an: i64, b: i64, bn: i64) -> i64 {
3073func sha256_init_workspace(workspace: *u8, capacity: i64) -> i64 {
3084func sha256_digest_workspace(bytes: *u8, n: i64, out: *u8, workspace: *u8, capacity: i64) -> i64 {
3098func sha256_digest_mapping_native(bytes: *u8, n: i64, out: *u8, mapping: i64) -> i64 {
3107func sha256_digest_checked_native(bytes: *u8, n: i64, out: *u8) -> i64 {
3131func fio_write_sync_fd(fd: i64, body: *u8, n: i64, result: *NxFileWriteResult) -> i64
3164func fio_sync_parent(path: *u8, result: *NxFileWriteResult) -> i64
3196func fio_exists(path: *u8) -> i64
3215func fio_region_init(r: *NxFileReadRegion) -> i64
3221func fio_region_close(r: *NxFileReadRegion) -> i64
3229func fio_region_fail(r: *NxFileReadRegion,stage: *u8,code: i64) -> i64
3234func fio_region_open(path: *u8,r: *NxFileReadRegion) -> i64
3250func fio_region_select(r: *NxFileReadRegion,start: i64,length: i64) -> i64
3260func fio_region_next(r: *NxFileReadRegion,out: *u8,cap: i64) -> i64
3295func fio_prepare_copy(source: *u8,candidate: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFilePrepareResult) -> i64
3356func fio_publish_candidate(candidate: *u8,live: *u8,out: *NxFilePublishResult) -> i64
3383func fio_target_lock_init(lock: *NxFileTargetLock) -> i64
3387func fio_target_lock_release(lock: *NxFileTargetLock) -> i64
called by 1: fio_replace_core calls 2: sys_flocksys_close
3398func fio_target_lock_acquire(live: *u8,lock: *NxFileTargetLock) -> i64
3433func 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
3459func fio_replace_init(out: *NxFileReplaceResult) -> i64
3466func 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
3475func fio_replace_with_backup(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFileReplaceResult) -> i64
3479func 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
3492func fio_verify_sha256(path: *u8,expected: *u8,buffer: *u8,capacity: i64) -> i64
3548func ccz_cat_num(buf: *u8, off: i64, v: i64) -> i64
called by 1: nxi_fd
3573func nxi_fd(fd: i64, v: i64) -> i64
3581func nxi_out(v: i64) -> i64 { return nxi_fd(NXI_STDOUT, v) }
called by 1: fsx_putn calls 1: nxi_fd
3582func nxi_err(v: i64) -> i64 { return nxi_fd(NXI_STDERR, v) }
calls 1: nxi_fd
3594func nxi_buf(dst: *u8, off: i64, v: i64) -> i64
called by 1: fxc_create
3629func vw_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
3632func vw_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64
3646func vw_num_at(s: *u8, n: i64, off: i64, endp: *i64) -> i64
3662func vw_parse_row(buf: *u8, ls: i64, le: i64, outp: *i64) -> i64
3688func vw_status_kb(buf: *u8, n: i64, pat: *u8) -> i64
3711func vw_should_kill(vsz_kb: i64, max_gb: i64, last_kill_s: i64, now_s: i64, cooldown_s: i64) -> i64
3720func vw_read(path: *u8, buf: *u8, cap: i64) -> i64
3731func vw_now_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] }
3734func vw_selfpid() -> i64
3745func vw_vmsize_parse(buf: *u8, n: i64) -> i64 { return vw_status_kb(buf, n, "VmSize:" as *u8) }
calls 1: vw_status_kb
3749func vw_status_kb_of(dirname: *u8, label: *u8) -> i64
3770func vw_vmsize_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmSize:" as *u8) }
calls 1: vw_status_kb_of
3772func vw_rss_kb_of(dirname: *u8) -> i64 { return vw_status_kb_of(dirname, "VmRSS:" as *u8) }
calls 1: vw_status_kb_of
3793func osf_under(path: *u8, root: *u8) -> i64
called by 1: osf_write_forbidden
3804func osf_write_forbidden(path: *u8) -> i64
called by 1: fsx_write_denied calls 1: osf_under
3842func 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
3844func osp_itoa(v: i64, out: *u8) -> i64
called by 1: osp_ppath calls 1: sys_mmap
3857func osp_num(buf: *u8, n: i64, off: i64, endp: *i64) -> i64
3868func osp_basename(s: *u8) -> *u8
called by 1: osp_cmd_argv0
3882func osp_bread(path: *u8, buf: *u8, cap: i64) -> i64
3891func osp_ppath(out: *u8, pid: i64, leaf: *u8) -> i64
3903func osp_list_pids(pids: *i64, cap: i64) -> i64
3932func osp_fd_count_from_fd_result(fd: i64, cause: *i64) -> i64
3958func osp_fd_count_from_fd(fd: i64) -> i64
3961func osp_fd_count(pid: i64) -> i64
3973func osp_stat_field(pid: i64, fidx: i64) -> i64
3996func osp_ppid(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_PPID) }
calls 1: osp_stat_field
3997func osp_starttime_ticks(pid: i64) -> i64 { return osp_stat_field(pid, OSP_F_START) }
calls 1: osp_stat_field
4001func osp_cpu_ticks(pid: i64) -> i64
calls 1: osp_stat_field
4009func osp_cmd_argv0(pid: i64, out: *u8, cap: i64) -> i64
4022func osp_hz() -> i64 { return OSP_HZ_LINUX }
4025func osp_supervisor_log() -> *u8 { return "/tmp/supervisor.log" as *u8 }
4026func osp_uptime_s() -> i64 { let ts: *i64 = sys_mmap(16) as *i64; sys_clock_gettime_mono(ts); return ts[0] }
4027func osp_selfpid() -> i64
4035func osp_boot_epoch() -> i64
4071func osp_stat_parent(buf: *u8, n: i64) -> i64
called by 1: osp_children
4086func osp_children(parent: i64, children: *i64, capacity: i64) -> i64
4159func 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 }
4164func fsx_putn(v: i64) -> i64 { nxi_out(v); return 0 }
4166func fsx_lower(s: *u8, out: *u8, cap: i64) -> i64
4179func 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 }
4190func fsx_cas_val(tok: *u8) -> *u8
called by 1: fsx_cas_ok
4198func fsx_cas_ok(cur: i64, tok: *u8) -> i64
4214func fsx_deny_hit(lp: *u8, ln: i64, needle: *u8) -> i64
4221func fsx_conf_deny(lp: *u8, ln: i64, conf: *u8) -> i64
4244func fsx_isalnum(c: i64) -> i64
called by 1: fsx_word_has
4251func fsx_ends_with(lp: *u8, ln: i64, suf: *u8) -> i64
called by 2: fsx_basename_isfsx_denied calls 1: vw_slen
4263func fsx_basename_is(lp: *u8, ln: i64, name: *u8) -> i64
called by 1: fsx_denied calls 2: vw_slenfsx_ends_with
4277func fsx_word_has(lp: *u8, ln: i64, w: *u8) -> i64
4302func fsx_content_secret(path: *u8) -> i64
4334func fsx_denied(path: *u8) -> i64
4378func fsx_fail(path: *u8, rc: i64) -> i64
4406func fsx_size(path: *u8) -> i64
4430func fsx_read(path: *u8, cap: i64) -> i64
4452func fsx_read_at(path: *u8, cap: i64, off: i64) -> i64
4489func fsx_read_lines(path: *u8, start: i64, count: i64) -> i64
4570func fsx_tail(path: *u8, count: i64) -> i64
4650func fsx_write_denied(path: *u8) -> i64
4675func fsx_tail_unterminated(path: *u8) -> i64
4689func fsx_append(path: *u8, body: *u8, blen: i64) -> i64
4720func fsx_write(path: *u8, body: *u8, blen: i64) -> i64
4775func fsx_count_occ(hay: *u8, hn: i64, nee: *u8, nl: i64) -> i64
4788func fsx_replace(hay: *u8, hn: i64, nee: *u8, nl: i64, rep: *u8, rl: i64, out: *u8, ocap: i64, allf: i64) -> i64
called by 1: fsx_edit
4822func fsx_edit(path: *u8, olds: *u8, news: *u8, allf: i64) -> i64
4893func fsx_edit_self_anchored(olds: *u8, news: *u8) -> i64
4908func fsx_ls(dir: *u8) -> i64 { return fsx_ls_from(dir, 0) }
calls 1: fsx_ls_from
4910func fsx_ls_from(dir: *u8, skip: i64) -> i64
4985func fsx_find(buf: *u8, n: i64, needle: *u8) -> i64
5000func fsx_kv_int(buf: *u8, n: i64, key: *u8) -> i64
called by 1: fsx_job_at calls 1: fsx_find
5018func fsx_job_id_ok(id: *u8) -> i64
called by 1: fsx_job_at
5031func fsx_job_path(dir: *u8, id: *u8, sfx: *u8, out: *u8) -> i64
called by 1: fsx_job_at
5047func fsx_job_at(dir: *u8, id: *u8) -> i64
5087func fsx_job(id: *u8) -> i64 { return fsx_job_at(FSX_JOB_DIR, id) }
calls 1: fsx_job_at
5098func fxc_create(path: *u8, body: *u8, n: i64) -> i64
5189func b64_enc_char(n: i64) -> i64
called by 1: b64_encode
5199func b64url_enc_char(n: i64) -> i64
5210func b64_dec_char(c: i64) -> i64
called by 1: b64_grab
5223func b64_encode(in_bytes: *u8, n: i64, out: *u8) -> i64
calls 1: b64_enc_char
5260func b64_grab(in_chars: *u8, n: i64, pos: *i64) -> i64
called by 1: b64_decode calls 1: b64_dec_char
5279func b64_decode(in_chars: *u8, n: i64, out: *u8) -> i64
calls 1: b64_grab
5324func gpa_u32(c: *GpaWasmCursor) -> i64
5338func gpa_wasm_header(data: *u8,n: i64) -> i64
called by 1: gpa_pair calls 1: gpa_same
5343func gpa_wasm_name(c: *GpaWasmCursor,name: *u8) -> i64
5352func gpa_memory_section(data: *u8,n: i64,shared: i64,m: *GpaMemory) -> i64
5375func gpa_body_section(c: *GpaWasmCursor,shared: i64,m: *GpaMemory,span: *GpaWasmCursor) -> i64
called by 1: gpa_pair calls 2: gpa_u32gpa_memory_section
5396func gpa_pair(plain: *u8,pn: i64,twin: *u8,tn: i64,memory: *GpaMemory) -> i64