================================================================================ K11 syscall-path-model — source-site snapshot ================================================================================ Generated by linux-wasm/tools/k11-syscall-path-model-probe/snapshot-sources.sh from Documentation/wasm/syscall-path-model.rst §13 K11-A2. Pinned at K11-A2 sub-phase close. Snapshots across six trees: [LIN] upstream linux/ tree (kernel/sys.c, kernel/exit.c, kernel/signal.c, fs/read_write.c, fs/pipe.c, kernel/fork.c, kernel/sched/*; the arch/x86/entry/syscalls/syscall_64.tbl K11-B1 consumes for sys_call_table population) [WAS] our wasm32-port/ tree (kernel/entry.c K10-era stub; kernel/clone.c K7/K9 thread/fork; include/asm/ thread_info.h THREAD_SIZE pin) [TLC] linux-wasm/scripts/ + Documentation/wasm/ (link-vmlinux- wasm.sh pipeline; memory-model.rst §1.2 spec; the new syscall-path-model.rst opener) [UPS] wackywasm-tools/musl-1.2.5/src/ (every K7/K8/K9 syscall wrapper; pty / ldisc / jobctrl wrappers K12 exercises) [OVR] wackywasm-tools/musl-src/src_overrides/ (existing K7/K8/K9 src_overrides at K11-A2 time; K11-C may DELETE some of these per the user's clean-up-not- layer directive) [HWJ] hardwarejs/src/ (kernelSpawnHandler.ts dispatchSyscall cases — THE files K11-C deletes; worker.mjs / worker-browser.mjs per-Worker vmlinux contract; bootKernel.ts num_vcpu / max_wasm_instances) Linux: v6.12 Section legend: [DEF] the function definition (file:line + leading prose) [GREP] call sites or other occurrences [SITE] inline excerpt of a load-bearing site [K11-B] where K11-B sub-phases will insert NEW code (annotation only; does not exist at K11-A2 time) ================================================================================ 1. LIN — upstream linux/ tree ================================================================================ The K11 phase populates wasm32's sys_call_table by calling upstream-clean sys_ handlers. The handlers exist; K11-B1 wires them up. Below: the load-bearing entry points. [DEF] do_syscall_64 (the x86_64 dispatch wrapper; we don't use this directly but the upstream pattern is structurally what arch/wasm32/kernel/entry.c emulates) arch/x86/entry/common.c:76 __visible noinstr bool do_syscall_64(struct pt_regs *regs, int nr) [DEF] sys_call_table (the upstream x86_64 dispatch table; arch/x86/entry/syscall_64.c emits it via the __SYSCALL_64 macro chain) arch/x86/entry/syscall_64.c:24 const sys_call_ptr_t sys_call_table[] = { arch/x86/entry/syscall_64.c:10 #define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *); arch/x86/entry/syscall_64.c:23 #define __SYSCALL(nr, sym) __x64_##sym, arch/x86/entry/syscall_64.c:29 #define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs); [GREP] arch/x86/entry/syscalls/syscall_64.tbl — the canonical x86_64 syscall numbering K11-B1 consumes. Every numbered entry has a sys_ kernel handler. arch/x86/entry/syscalls/syscall_64.tbl:12 0 common read sys_read arch/x86/entry/syscalls/syscall_64.tbl:13 1 common write sys_write arch/x86/entry/syscalls/syscall_64.tbl:14 2 common open sys_open arch/x86/entry/syscalls/syscall_64.tbl:15 3 common close sys_close arch/x86/entry/syscalls/syscall_64.tbl:16 4 common stat sys_newstat arch/x86/entry/syscalls/syscall_64.tbl:17 5 common fstat sys_newfstat arch/x86/entry/syscalls/syscall_64.tbl:18 6 common lstat sys_newlstat arch/x86/entry/syscalls/syscall_64.tbl:19 7 common poll sys_poll arch/x86/entry/syscalls/syscall_64.tbl:20 8 common lseek sys_lseek arch/x86/entry/syscalls/syscall_64.tbl:21 9 common mmap sys_mmap arch/x86/entry/syscalls/syscall_64.tbl:22 10 common mprotect sys_mprotect arch/x86/entry/syscalls/syscall_64.tbl:23 11 common munmap sys_munmap arch/x86/entry/syscalls/syscall_64.tbl:24 12 common brk sys_brk arch/x86/entry/syscalls/syscall_64.tbl:25 13 64 rt_sigaction sys_rt_sigaction arch/x86/entry/syscalls/syscall_64.tbl:26 14 common rt_sigprocmask sys_rt_sigprocmask arch/x86/entry/syscalls/syscall_64.tbl:27 15 64 rt_sigreturn sys_rt_sigreturn arch/x86/entry/syscalls/syscall_64.tbl:28 16 64 ioctl sys_ioctl arch/x86/entry/syscalls/syscall_64.tbl:29 17 common pread64 sys_pread64 arch/x86/entry/syscalls/syscall_64.tbl:30 18 common pwrite64 sys_pwrite64 arch/x86/entry/syscalls/syscall_64.tbl:31 19 64 readv sys_readv arch/x86/entry/syscalls/syscall_64.tbl:32 20 64 writev sys_writev arch/x86/entry/syscalls/syscall_64.tbl:33 21 common access sys_access arch/x86/entry/syscalls/syscall_64.tbl:34 22 common pipe sys_pipe arch/x86/entry/syscalls/syscall_64.tbl:35 23 common select sys_select arch/x86/entry/syscalls/syscall_64.tbl:36 24 common sched_yield sys_sched_yield arch/x86/entry/syscalls/syscall_64.tbl:37 25 common mremap sys_mremap arch/x86/entry/syscalls/syscall_64.tbl:38 26 common msync sys_msync arch/x86/entry/syscalls/syscall_64.tbl:39 27 common mincore sys_mincore arch/x86/entry/syscalls/syscall_64.tbl:40 28 common madvise sys_madvise arch/x86/entry/syscalls/syscall_64.tbl:41 29 common shmget sys_shmget arch/x86/entry/syscalls/syscall_64.tbl:42 30 common shmat sys_shmat arch/x86/entry/syscalls/syscall_64.tbl:43 31 common shmctl sys_shmctl arch/x86/entry/syscalls/syscall_64.tbl:44 32 common dup sys_dup arch/x86/entry/syscalls/syscall_64.tbl:45 33 common dup2 sys_dup2 arch/x86/entry/syscalls/syscall_64.tbl:46 34 common pause sys_pause arch/x86/entry/syscalls/syscall_64.tbl:47 35 common nanosleep sys_nanosleep arch/x86/entry/syscalls/syscall_64.tbl:48 36 common getitimer sys_getitimer arch/x86/entry/syscalls/syscall_64.tbl:49 37 common alarm sys_alarm arch/x86/entry/syscalls/syscall_64.tbl:50 38 common setitimer sys_setitimer arch/x86/entry/syscalls/syscall_64.tbl:51 39 common getpid sys_getpid arch/x86/entry/syscalls/syscall_64.tbl:52 40 common sendfile sys_sendfile64 arch/x86/entry/syscalls/syscall_64.tbl:53 41 common socket sys_socket arch/x86/entry/syscalls/syscall_64.tbl:54 42 common connect sys_connect arch/x86/entry/syscalls/syscall_64.tbl:55 43 common accept sys_accept arch/x86/entry/syscalls/syscall_64.tbl:56 44 common sendto sys_sendto arch/x86/entry/syscalls/syscall_64.tbl:57 45 64 recvfrom sys_recvfrom arch/x86/entry/syscalls/syscall_64.tbl:58 46 64 sendmsg sys_sendmsg arch/x86/entry/syscalls/syscall_64.tbl:59 47 64 recvmsg sys_recvmsg arch/x86/entry/syscalls/syscall_64.tbl:60 48 common shutdown sys_shutdown arch/x86/entry/syscalls/syscall_64.tbl:61 49 common bind sys_bind arch/x86/entry/syscalls/syscall_64.tbl:62 50 common listen sys_listen arch/x86/entry/syscalls/syscall_64.tbl:63 51 common getsockname sys_getsockname arch/x86/entry/syscalls/syscall_64.tbl:64 52 common getpeername sys_getpeername arch/x86/entry/syscalls/syscall_64.tbl:65 53 common socketpair sys_socketpair arch/x86/entry/syscalls/syscall_64.tbl:66 54 64 setsockopt sys_setsockopt arch/x86/entry/syscalls/syscall_64.tbl:67 55 64 getsockopt sys_getsockopt arch/x86/entry/syscalls/syscall_64.tbl:68 56 common clone sys_clone arch/x86/entry/syscalls/syscall_64.tbl:69 57 common fork sys_fork arch/x86/entry/syscalls/syscall_64.tbl:70 58 common vfork sys_vfork arch/x86/entry/syscalls/syscall_64.tbl:71 59 64 execve sys_execve arch/x86/entry/syscalls/syscall_64.tbl:72 60 common exit sys_exit - noreturn arch/x86/entry/syscalls/syscall_64.tbl:73 61 common wait4 sys_wait4 arch/x86/entry/syscalls/syscall_64.tbl:74 62 common kill sys_kill arch/x86/entry/syscalls/syscall_64.tbl:75 63 common uname sys_newuname arch/x86/entry/syscalls/syscall_64.tbl:76 64 common semget sys_semget arch/x86/entry/syscalls/syscall_64.tbl:77 65 common semop sys_semop arch/x86/entry/syscalls/syscall_64.tbl:78 66 common semctl sys_semctl arch/x86/entry/syscalls/syscall_64.tbl:79 67 common shmdt sys_shmdt arch/x86/entry/syscalls/syscall_64.tbl:80 68 common msgget sys_msgget arch/x86/entry/syscalls/syscall_64.tbl:81 69 common msgsnd sys_msgsnd arch/x86/entry/syscalls/syscall_64.tbl:82 70 common msgrcv sys_msgrcv arch/x86/entry/syscalls/syscall_64.tbl:83 71 common msgctl sys_msgctl arch/x86/entry/syscalls/syscall_64.tbl:84 72 common fcntl sys_fcntl arch/x86/entry/syscalls/syscall_64.tbl:85 73 common flock sys_flock arch/x86/entry/syscalls/syscall_64.tbl:86 74 common fsync sys_fsync arch/x86/entry/syscalls/syscall_64.tbl:87 75 common fdatasync sys_fdatasync arch/x86/entry/syscalls/syscall_64.tbl:88 76 common truncate sys_truncate arch/x86/entry/syscalls/syscall_64.tbl:89 77 common ftruncate sys_ftruncate arch/x86/entry/syscalls/syscall_64.tbl:90 78 common getdents sys_getdents arch/x86/entry/syscalls/syscall_64.tbl:91 79 common getcwd sys_getcwd arch/x86/entry/syscalls/syscall_64.tbl:92 80 common chdir sys_chdir arch/x86/entry/syscalls/syscall_64.tbl:93 81 common fchdir sys_fchdir arch/x86/entry/syscalls/syscall_64.tbl:94 82 common rename sys_rename arch/x86/entry/syscalls/syscall_64.tbl:95 83 common mkdir sys_mkdir arch/x86/entry/syscalls/syscall_64.tbl:96 84 common rmdir sys_rmdir arch/x86/entry/syscalls/syscall_64.tbl:97 85 common creat sys_creat arch/x86/entry/syscalls/syscall_64.tbl:98 86 common link sys_link arch/x86/entry/syscalls/syscall_64.tbl:99 87 common unlink sys_unlink arch/x86/entry/syscalls/syscall_64.tbl:100 88 common symlink sys_symlink arch/x86/entry/syscalls/syscall_64.tbl:101 89 common readlink sys_readlink arch/x86/entry/syscalls/syscall_64.tbl:102 90 common chmod sys_chmod arch/x86/entry/syscalls/syscall_64.tbl:103 91 common fchmod sys_fchmod arch/x86/entry/syscalls/syscall_64.tbl:104 92 common chown sys_chown arch/x86/entry/syscalls/syscall_64.tbl:105 93 common fchown sys_fchown arch/x86/entry/syscalls/syscall_64.tbl:106 94 common lchown sys_lchown arch/x86/entry/syscalls/syscall_64.tbl:107 95 common umask sys_umask arch/x86/entry/syscalls/syscall_64.tbl:108 96 common gettimeofday sys_gettimeofday arch/x86/entry/syscalls/syscall_64.tbl:109 97 common getrlimit sys_getrlimit arch/x86/entry/syscalls/syscall_64.tbl:110 98 common getrusage sys_getrusage arch/x86/entry/syscalls/syscall_64.tbl:111 99 common sysinfo sys_sysinfo ... (truncated; full table at linux/arch/x86/entry/syscalls/syscall_64.tbl) [DEF] SYSCALL_DEFINE0..6 macros — the upstream macros every sys_ uses. K11-B1's syscall_table.c picks up these handlers via the SYSCALL_METADATA registration chain. include/linux/syscalls.h:216 #define SYSCALL_DEFINE0(sname) \ include/linux/syscalls.h:223 #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) include/linux/syscalls.h:224 #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) include/linux/syscalls.h:225 #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) include/linux/syscalls.h:226 #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) include/linux/syscalls.h:227 #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) include/linux/syscalls.h:228 #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) include/linux/syscalls.h:230 #define SYSCALL_DEFINE_MAXARGS 6 include/linux/syscalls.h:232 #define SYSCALL_DEFINEx(x, sname, ...) \ [DEF] sys_read / sys_write / sys_close / sys_dup2 (fs/read_write.c + fs/open.c + fs/file.c — the file-descriptor surface K11-C1's R-K9-1 retirement re-routes from the JS-direct registries to the kernel files_struct). fs/read_write.c:701 ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count) fs/read_write.c:725 ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count) fs/file.c:1321 static int ksys_dup3(unsigned int oldfd, unsigned int newfd, int flags) [DEF] sys_pipe / sys_pipe2 (fs/pipe.c — the kernel pipe ring buffer K11-C1's R-K9-1 retirement enables for cross- process communication). fs/pipe.c:1040 SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) [DEF] sys_wait4 / kernel_wait4 / do_wait (kernel/exit.c — the kernel-side child reaping K11-C1's R-K9-1 retirement enables). kernel/exit.c:1875 SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, kernel/exit.c:1902 COMPAT_SYSCALL_DEFINE4(wait4, kernel/exit.c:1816 long kernel_wait4(pid_t upid, int __user *stat_addr, int options, kernel/exit.c:1680 static long do_wait(struct wait_opts *wo) [DEF] sys_kill / sys_tkill / sys_tgkill (kernel/signal.c — the kernel-side signal delivery K11-B6's R-K8-2 retirement enables). kernel/signal.c:3845 SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) kernel/signal.c:4063 SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) kernel/signal.c:4047 SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig) [DEF] sys_rt_sigaction / do_sigaction (kernel/signal.c — the kernel-side current->sighand population K11-B5's R-K8-1 retirement enables). kernel/signal.c:4182 int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) [DEF] sys_setpgid / sys_getpgid / sys_setsid / sys_getsid / sys_getpgrp (kernel/sys.c — the kernel-side task->signal->pgrp surface K11-C1's R-K9-1 retirement enables). kernel/sys.c:1082 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) kernel/sys.c:1181 SYSCALL_DEFINE1(getpgid, pid_t, pid) kernel/sys.c:1195 SYSCALL_DEFINE1(getsid, pid_t, pid) [DEF] _do_fork / kernel_clone (kernel/fork.c — K11-B5+ the in-Worker fork path that R-K9-2's posix_spawn(2) partial retirement routes through). kernel/fork.c:2745 pid_t kernel_clone(struct kernel_clone_args *args) ================================================================================ 2. WAS — wasm32-port/ tree ================================================================================ [SITE] arch/wasm32/kernel/entry.c — the K10-era wasm_syscall stub K11-A3 replaces with the real stack-swap. kernel/entry.c:5 * Both vmlinux and process Workers export `wasm_syscall`. When a process kernel/entry.c:18 __attribute__((export_name("wasm_syscall"))) kernel/entry.c:19 long wasm_syscall(unsigned long nr, long a0, long a1, long a2, [SITE] arch/wasm32/include/asm/thread_info.h — THREAD_SIZE pin (32 KiB per K4 close; the K11-A1 drift catch). include/asm/thread_info.h:32 #define THREAD_SIZE_ORDER 3 include/asm/thread_info.h:33 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) [SITE] arch/wasm32/kernel/clone.c — the K7/K9 thread/fork machinery K11-B5+ hooks signal/wait paths into. [SITE] arch/wasm32/kernel/syscall_table.c — at K11-A2 time this file does NOT exist; K11-B1 creates it. (UNEXPECTED: file already exists at K11-A2 time) kernel/syscall_table.c:15 const void *sys_call_table[__NR_syscalls] = { ================================================================================ 3. TLC — linux-wasm/scripts/ + Documentation/wasm/ ================================================================================ [SITE] linux-wasm/Documentation/wasm/syscall-path-model.rst — the K11 opener (THIS phase's spec). syscall-path-model.rst:37 1. §2 architectural ground truth (citations to the spec sites) syscall-path-model.rst:38 2. §3 the K5–K9 shortcut state being retired syscall-path-model.rst:39 3. §4 per-Worker vmlinux instantiation contract syscall-path-model.rst:40 4. §5 ``linux.syscall`` import resolution syscall-path-model.rst:41 5. §6 ``wasm_syscall`` entry sequence syscall-path-model.rst:42 6. §7 ``sys_call_table`` population strategy syscall-path-model.rst:43 7. §8 ``arch_cpu_up`` / ``arch_cpu_down`` hooks syscall-path-model.rst:44 8. §9 ``num_vcpu`` parameter syscall-path-model.rst:45 9. §10 ``max_wasm_instances`` parameter syscall-path-model.rst:46 10. §11 R-K10-W1 inversion plan syscall-path-model.rst:47 11. §12 R-K8-1 / R-K8-2 / R-K9-1 / R-K9-2 / R-K9-3 retirement plan syscall-path-model.rst:48 12. §13 K11 sub-phase decomposition syscall-path-model.rst:49 13. §14 refutation budget syscall-path-model.rst:50 14. §15 acceptance criteria syscall-path-model.rst:51 15. §16 K10 close ledger amendment + scope correction proposal syscall-path-model.rst:52 16. §17 §20.6.1 retroactive dependency-check syscall-path-model.rst:53 17. Appendix A — K11 close checklist syscall-path-model.rst:56 1. Why this document exists separately syscall-path-model.rst:97 2. Architectural ground truth syscall-path-model.rst:175 3. The K5–K9 shortcut state being retired syscall-path-model.rst:252 4. Per-Worker vmlinux instantiation contract syscall-path-model.rst:258 4.1. Worker classes (taxonomy) syscall-path-model.rst:295 4.2. Spawn-time amendment to worker.mjs syscall-path-model.rst:304 1. Receive ``boot`` message from main thread carrying syscall-path-model.rst:308 2. Instantiate ``vmlinux.wasm`` first (the kernel instance for [SITE] linux-wasm/Documentation/wasm/memory-model.rst §1.2 — the spec text for the wasm_syscall stack-swap dance K11-A3 implements. memory-model.rst:175 1.2 Syscall entry sequence (kernel-stack swap) [SITE] linux-wasm/Documentation/wasm/post-link-pass-conventions.rst — the conventions K11 may extend if syscall-table-rewrite passes are needed (currently expected: NO post-link passes added by K11; sys_call_table is ordinary C). post-link-pass-conventions.rst:17 0. Why post-link surgery exists in this port at all post-link-pass-conventions.rst:50 1. The hierarchy of post-link tools post-link-pass-conventions.rst:81 2. Substitutive vs. additive — which shape your pass is post-link-pass-conventions.rst:143 3. Mandatory properties of a post-link pass post-link-pass-conventions.rst:186 4. Naming conventions post-link-pass-conventions.rst:203 5. Listed passes (current + planned) post-link-pass-conventions.rst:221 6. Anti-patterns ================================================================================ 4. UPS — wackywasm-tools/musl-1.2.5/src/ ================================================================================ K7/K8/K9 demo musl wrappers (already-exercised surface): src/dirent/opendir.c:16 __syscall(SYS_close, fd); src/exit/_Exit.c:6 __syscall(SYS_exit_group, ec); src/exit/_Exit.c:7 for (;;) __syscall(SYS_exit, ec); src/exit/abort.c:20 __syscall(SYS_rt_sigaction, SIGABRT, src/exit/abort.c:22 __syscall(SYS_tkill, __pthread_self()->tid, SIGABRT); src/fcntl/fcntl.c:32 if (ret >= 0) __syscall(SYS_close, ret); src/internal/syscall.h:395 #define __sys_wait4(a,b,c,d) __syscall(SYS_wait4,a,b,c,d) src/linux/membarrier.c:44 __syscall(SYS_tkill, td->tid, SIGSYNCCALL); src/linux/readahead.c:7 return syscall(SYS_readahead, fd, __SYSCALL_LL_O(pos), len); src/linux/setgroups.c:24 __syscall(SYS_kill, __syscall(SYS_getpid), SIGKILL); src/linux/wait4.c:14 r = __syscall(SYS_wait4_time64, pid, status, options, kru64); src/mq/mq_close.c:6 return syscall(SYS_close, mqd); src/mq/mq_notify.c:71 __syscall(SYS_close, s); src/mq/mq_notify.c:83 __syscall(SYS_close, s); src/network/if_indextoname.c:17 __syscall(SYS_close, fd); src/network/if_nametoindex.c:16 __syscall(SYS_close, fd); src/network/netlink.c:50 __syscall(SYS_close,fd); src/network/res_msend.c:22 if (pfd[i].fd >= 0) __syscall(SYS_close, pfd[i].fd); src/network/res_msend.c:306 __syscall(SYS_close, pfd[i].fd); src/process/posix_spawn.c:26 return __syscall(SYS_dup2, old, new); src/process/posix_spawn.c:70 if ((ret=__syscall(SYS_setsid)) < 0) src/process/posix_spawn.c:74 if ((ret=__syscall(SYS_setpgid, 0, attr->__pgrp))) src/process/posix_spawn.c:97 __syscall(SYS_close, p); src/process/posix_spawn.c:102 __syscall(SYS_close, op->fd); src/process/posix_spawn.c:127 __syscall(SYS_close, fd); src/process/posix_spawn.c:162 do r = __syscall(SYS_write, p, &ret, sizeof ret); src/signal/kill.c:6 return syscall(SYS_kill, pid, sig); src/signal/raise.c:10 int ret = syscall(SYS_tkill, __pthread_self()->tid, sig); src/signal/sigaction.c:54 int r = __syscall(SYS_rt_sigaction, sig, sa?&ksa:0, old?&ksa_old:0, _NSIG/8); src/stat/fchmodat.c:38 __syscall(SYS_close, fd2); src/stdio/__stdio_close.c:13 return syscall(SYS_close, __aio_close(f->fd)); src/stdio/__stdio_read.c:12 cnt = iov[0].iov_len ? syscall(SYS_readv, f->fd, iov, 2) src/stdio/__stdio_read.c:13 : syscall(SYS_read, f->fd, iov[1].iov_base, iov[1].iov_len); src/stdio/__stdio_write.c:15 cnt = syscall(SYS_writev, f->fd, iov, iovcnt); src/stdio/fopen.c:29 __syscall(SYS_close, fd); src/stdio/popen.c:30 __syscall(SYS_close, p[0]); src/stdio/popen.c:31 __syscall(SYS_close, p[1]); src/stdio/popen.c:47 __syscall(SYS_close, p[1-op]); src/stdio/popen.c:57 __syscall(SYS_close, p[1-op]); src/stdio/tempnam.c:40 r = __syscall(SYS_readlink, s, (char[1]){0}, 1); K12 surface — pty / ldisc / jobctrl wrappers (NOT yet exercised): ================================================================================ 5. OVR — wackywasm-tools/musl-src/src_overrides/ ================================================================================ K7/K8/K9 src_overrides existing at K11-A2 time. K11-C may DELETE some of these as the kernel-side path takes over per the user's clean-up-not-layer directive. ./env/wasm32/__init_tls.c ./internal/wasm32/syscall_ret.c ./signal/wasm32/__wasm_signal_dispatch.c ./signal/wasm32/sigaction.c ./signal/wasm32/sigsuspend.c ./signal/wasm32/sigtimedwait.c ./thread/wasm32/__set_thread_area.c ./thread/wasm32/clone.c ./thread/wasm32/pthread_sigmask.c ================================================================================ 6. HWJ — hardwarejs/src/ ================================================================================ [DEF] kernelSpawnHandler.ts dispatchSyscall — THE 36 JS-direct cases K11-C deletes. Each case becomes "forward to vmlinux.exports.wasm_syscall" or vanishes entirely depending on whether it was a fast-path or a stand-in for a missing kernel handler. 1039: case __NR_ioctl { 1049: case __NR_set_tid_address { 1060: case __NR_arch_prctl { 1071: case __NR_read { 1122: case __NR_close { 1137: case __NR_dup2 { 1154: case __NR_pipe 1155: case __NR_pipe2 { 1194: case __NR_exit 1195: case __NR_exit_group { 1203: case __NR_mmap { 1246: case __NR_munmap { 1257: case __NR_mprotect { 1268: case __NR_brk { 1279: case __NR_madvise { 1287: case __NR_rt_sigprocmask { 1300: case __NR_set_robust_list { 1310: case __NR_clock_gettime { 1340: case __NR_clone { 1495: case __NR_rt_sigaction { 1529: case __NR_wasm_spawn_image { 1616: case __NR_wasm_spawn_image_actions { 1768: case __NR_wait4 { 1831: case __NR_kill 1832: case __NR_tkill 1833: case __NR_tgkill { 1950: case __NR_getpid { 1954: case __NR_getppid { 1959: case __NR_getpgid 1960: case __NR_getpgrp { 1966: case __NR_setpgid { 1971: case __NR_setsid { 1976: case __NR_getsid { 1981: case __NR_pause { 988: case __NR_write { 999: case __NR_writev { [K11-B] hardwarejs/src/worker.mjs — at K11-A2 time, instantiates ONE userspace .wasm; K11-B amends to instantiate vmlinux.wasm BEFORE the userspace .wasm in the same Worker (per syscall-path-model.rst §4.2). 313: const instance = await WebAssembly.instantiate(module, filtered); [K11-B] hardwarejs/src/bootKernel.ts — at K11-A2 time, the BootKernelOptions interface does NOT have num_vcpu / max_wasm_instances. K11-B3 / K11-B4 add them. 274:export async function bootKernel(opts BootKernelOptions): Promise { 303: * K6 amendment (see BootKernelOptions.spawnHandler doc) 45:export interface BootKernelOptions { [K11-C delete-not-comment] JS-direct registries — files DELETED (not commented out, not left as fallbacks) per the user's clean-up-not-layer standing directive: childExitRegistry.ts (exists; 226 lines; DELETE at K11-C close) pipeRegistry.ts (exists; 276 lines; DELETE at K11-C close) fdTableRegistry.ts (exists; 252 lines; DELETE at K11-C close) stdinChannel.ts (exists; 163 lines; DELETE at K11-C close) processGroupRegistry.ts (exists; 183 lines; DELETE at K11-C close) childImageRegistry.ts (exists; 59 lines; DELETE at K11-C close) ================================================================================ End of K11-A2 source-site snapshot ================================================================================