435 lines · plain
1================================================================================2K11 syscall-path-model — source-site snapshot3================================================================================4 5Generated by linux-wasm/tools/k11-syscall-path-model-probe/snapshot-sources.sh6from Documentation/wasm/syscall-path-model.rst §13 K11-A2.7 8Pinned at K11-A2 sub-phase close. Snapshots across six trees:9 10 [LIN] upstream linux/ tree (kernel/sys.c, kernel/exit.c,11 kernel/signal.c, fs/read_write.c, fs/pipe.c,12 kernel/fork.c, kernel/sched/*; the13 arch/x86/entry/syscalls/syscall_64.tbl K11-B114 consumes for sys_call_table population)15 [WAS] our wasm32-port/ tree (kernel/entry.c K10-era stub;16 kernel/clone.c K7/K9 thread/fork; include/asm/17 thread_info.h THREAD_SIZE pin)18 [TLC] linux-wasm/scripts/ + Documentation/wasm/ (link-vmlinux-19 wasm.sh pipeline; memory-model.rst §1.2 spec; the new20 syscall-path-model.rst opener)21 [UPS] wackywasm-tools/musl-1.2.5/src/ (every K7/K8/K9 syscall22 wrapper; pty / ldisc / jobctrl wrappers K12 exercises)23 [OVR] wackywasm-tools/musl-src/src_overrides/ (existing24 K7/K8/K9 src_overrides at K11-A2 time; K11-C may25 DELETE some of these per the user's clean-up-not-26 layer directive)27 [HWJ] hardwarejs/src/ (kernelSpawnHandler.ts dispatchSyscall28 cases — THE files K11-C deletes; worker.mjs /29 worker-browser.mjs per-Worker vmlinux contract;30 bootKernel.ts num_vcpu / max_wasm_instances)31 32Linux: v6.1233 34Section legend:35 [DEF] the function definition (file:line + leading prose)36 [GREP] call sites or other occurrences37 [SITE] inline excerpt of a load-bearing site38 [K11-B] where K11-B sub-phases will insert NEW code39 (annotation only; does not exist at K11-A2 time)40 41================================================================================421. LIN — upstream linux/ tree43================================================================================44 45The K11 phase populates wasm32's sys_call_table by calling46upstream-clean sys_<name> handlers. The handlers exist; K11-B147wires them up. Below: the load-bearing entry points.48 49[DEF] do_syscall_64 (the x86_64 dispatch wrapper; we don't50 use this directly but the upstream pattern is51 structurally what arch/wasm32/kernel/entry.c emulates)52 arch/x86/entry/common.c:76 __visible noinstr bool do_syscall_64(struct pt_regs *regs, int nr)53 54[DEF] sys_call_table (the upstream x86_64 dispatch table;55 arch/x86/entry/syscall_64.c emits it via the56 __SYSCALL_64 macro chain)57 arch/x86/entry/syscall_64.c:24 const sys_call_ptr_t sys_call_table[] = {58 arch/x86/entry/syscall_64.c:10 #define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *);59 arch/x86/entry/syscall_64.c:23 #define __SYSCALL(nr, sym) __x64_##sym,60 arch/x86/entry/syscall_64.c:29 #define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);61 62[GREP] arch/x86/entry/syscalls/syscall_64.tbl — the canonical63 x86_64 syscall numbering K11-B1 consumes. Every numbered64 entry has a sys_<name> kernel handler.65 arch/x86/entry/syscalls/syscall_64.tbl:12 0 common read sys_read66 arch/x86/entry/syscalls/syscall_64.tbl:13 1 common write sys_write67 arch/x86/entry/syscalls/syscall_64.tbl:14 2 common open sys_open68 arch/x86/entry/syscalls/syscall_64.tbl:15 3 common close sys_close69 arch/x86/entry/syscalls/syscall_64.tbl:16 4 common stat sys_newstat70 arch/x86/entry/syscalls/syscall_64.tbl:17 5 common fstat sys_newfstat71 arch/x86/entry/syscalls/syscall_64.tbl:18 6 common lstat sys_newlstat72 arch/x86/entry/syscalls/syscall_64.tbl:19 7 common poll sys_poll73 arch/x86/entry/syscalls/syscall_64.tbl:20 8 common lseek sys_lseek74 arch/x86/entry/syscalls/syscall_64.tbl:21 9 common mmap sys_mmap75 arch/x86/entry/syscalls/syscall_64.tbl:22 10 common mprotect sys_mprotect76 arch/x86/entry/syscalls/syscall_64.tbl:23 11 common munmap sys_munmap77 arch/x86/entry/syscalls/syscall_64.tbl:24 12 common brk sys_brk78 arch/x86/entry/syscalls/syscall_64.tbl:25 13 64 rt_sigaction sys_rt_sigaction79 arch/x86/entry/syscalls/syscall_64.tbl:26 14 common rt_sigprocmask sys_rt_sigprocmask80 arch/x86/entry/syscalls/syscall_64.tbl:27 15 64 rt_sigreturn sys_rt_sigreturn81 arch/x86/entry/syscalls/syscall_64.tbl:28 16 64 ioctl sys_ioctl82 arch/x86/entry/syscalls/syscall_64.tbl:29 17 common pread64 sys_pread6483 arch/x86/entry/syscalls/syscall_64.tbl:30 18 common pwrite64 sys_pwrite6484 arch/x86/entry/syscalls/syscall_64.tbl:31 19 64 readv sys_readv85 arch/x86/entry/syscalls/syscall_64.tbl:32 20 64 writev sys_writev86 arch/x86/entry/syscalls/syscall_64.tbl:33 21 common access sys_access87 arch/x86/entry/syscalls/syscall_64.tbl:34 22 common pipe sys_pipe88 arch/x86/entry/syscalls/syscall_64.tbl:35 23 common select sys_select89 arch/x86/entry/syscalls/syscall_64.tbl:36 24 common sched_yield sys_sched_yield90 arch/x86/entry/syscalls/syscall_64.tbl:37 25 common mremap sys_mremap91 arch/x86/entry/syscalls/syscall_64.tbl:38 26 common msync sys_msync92 arch/x86/entry/syscalls/syscall_64.tbl:39 27 common mincore sys_mincore93 arch/x86/entry/syscalls/syscall_64.tbl:40 28 common madvise sys_madvise94 arch/x86/entry/syscalls/syscall_64.tbl:41 29 common shmget sys_shmget95 arch/x86/entry/syscalls/syscall_64.tbl:42 30 common shmat sys_shmat96 arch/x86/entry/syscalls/syscall_64.tbl:43 31 common shmctl sys_shmctl97 arch/x86/entry/syscalls/syscall_64.tbl:44 32 common dup sys_dup98 arch/x86/entry/syscalls/syscall_64.tbl:45 33 common dup2 sys_dup299 arch/x86/entry/syscalls/syscall_64.tbl:46 34 common pause sys_pause100 arch/x86/entry/syscalls/syscall_64.tbl:47 35 common nanosleep sys_nanosleep101 arch/x86/entry/syscalls/syscall_64.tbl:48 36 common getitimer sys_getitimer102 arch/x86/entry/syscalls/syscall_64.tbl:49 37 common alarm sys_alarm103 arch/x86/entry/syscalls/syscall_64.tbl:50 38 common setitimer sys_setitimer104 arch/x86/entry/syscalls/syscall_64.tbl:51 39 common getpid sys_getpid105 arch/x86/entry/syscalls/syscall_64.tbl:52 40 common sendfile sys_sendfile64106 arch/x86/entry/syscalls/syscall_64.tbl:53 41 common socket sys_socket107 arch/x86/entry/syscalls/syscall_64.tbl:54 42 common connect sys_connect108 arch/x86/entry/syscalls/syscall_64.tbl:55 43 common accept sys_accept109 arch/x86/entry/syscalls/syscall_64.tbl:56 44 common sendto sys_sendto110 arch/x86/entry/syscalls/syscall_64.tbl:57 45 64 recvfrom sys_recvfrom111 arch/x86/entry/syscalls/syscall_64.tbl:58 46 64 sendmsg sys_sendmsg112 arch/x86/entry/syscalls/syscall_64.tbl:59 47 64 recvmsg sys_recvmsg113 arch/x86/entry/syscalls/syscall_64.tbl:60 48 common shutdown sys_shutdown114 arch/x86/entry/syscalls/syscall_64.tbl:61 49 common bind sys_bind115 arch/x86/entry/syscalls/syscall_64.tbl:62 50 common listen sys_listen116 arch/x86/entry/syscalls/syscall_64.tbl:63 51 common getsockname sys_getsockname117 arch/x86/entry/syscalls/syscall_64.tbl:64 52 common getpeername sys_getpeername118 arch/x86/entry/syscalls/syscall_64.tbl:65 53 common socketpair sys_socketpair119 arch/x86/entry/syscalls/syscall_64.tbl:66 54 64 setsockopt sys_setsockopt120 arch/x86/entry/syscalls/syscall_64.tbl:67 55 64 getsockopt sys_getsockopt121 arch/x86/entry/syscalls/syscall_64.tbl:68 56 common clone sys_clone122 arch/x86/entry/syscalls/syscall_64.tbl:69 57 common fork sys_fork123 arch/x86/entry/syscalls/syscall_64.tbl:70 58 common vfork sys_vfork124 arch/x86/entry/syscalls/syscall_64.tbl:71 59 64 execve sys_execve125 arch/x86/entry/syscalls/syscall_64.tbl:72 60 common exit sys_exit - noreturn126 arch/x86/entry/syscalls/syscall_64.tbl:73 61 common wait4 sys_wait4127 arch/x86/entry/syscalls/syscall_64.tbl:74 62 common kill sys_kill128 arch/x86/entry/syscalls/syscall_64.tbl:75 63 common uname sys_newuname129 arch/x86/entry/syscalls/syscall_64.tbl:76 64 common semget sys_semget130 arch/x86/entry/syscalls/syscall_64.tbl:77 65 common semop sys_semop131 arch/x86/entry/syscalls/syscall_64.tbl:78 66 common semctl sys_semctl132 arch/x86/entry/syscalls/syscall_64.tbl:79 67 common shmdt sys_shmdt133 arch/x86/entry/syscalls/syscall_64.tbl:80 68 common msgget sys_msgget134 arch/x86/entry/syscalls/syscall_64.tbl:81 69 common msgsnd sys_msgsnd135 arch/x86/entry/syscalls/syscall_64.tbl:82 70 common msgrcv sys_msgrcv136 arch/x86/entry/syscalls/syscall_64.tbl:83 71 common msgctl sys_msgctl137 arch/x86/entry/syscalls/syscall_64.tbl:84 72 common fcntl sys_fcntl138 arch/x86/entry/syscalls/syscall_64.tbl:85 73 common flock sys_flock139 arch/x86/entry/syscalls/syscall_64.tbl:86 74 common fsync sys_fsync140 arch/x86/entry/syscalls/syscall_64.tbl:87 75 common fdatasync sys_fdatasync141 arch/x86/entry/syscalls/syscall_64.tbl:88 76 common truncate sys_truncate142 arch/x86/entry/syscalls/syscall_64.tbl:89 77 common ftruncate sys_ftruncate143 arch/x86/entry/syscalls/syscall_64.tbl:90 78 common getdents sys_getdents144 arch/x86/entry/syscalls/syscall_64.tbl:91 79 common getcwd sys_getcwd145 arch/x86/entry/syscalls/syscall_64.tbl:92 80 common chdir sys_chdir146 arch/x86/entry/syscalls/syscall_64.tbl:93 81 common fchdir sys_fchdir147 arch/x86/entry/syscalls/syscall_64.tbl:94 82 common rename sys_rename148 arch/x86/entry/syscalls/syscall_64.tbl:95 83 common mkdir sys_mkdir149 arch/x86/entry/syscalls/syscall_64.tbl:96 84 common rmdir sys_rmdir150 arch/x86/entry/syscalls/syscall_64.tbl:97 85 common creat sys_creat151 arch/x86/entry/syscalls/syscall_64.tbl:98 86 common link sys_link152 arch/x86/entry/syscalls/syscall_64.tbl:99 87 common unlink sys_unlink153 arch/x86/entry/syscalls/syscall_64.tbl:100 88 common symlink sys_symlink154 arch/x86/entry/syscalls/syscall_64.tbl:101 89 common readlink sys_readlink155 arch/x86/entry/syscalls/syscall_64.tbl:102 90 common chmod sys_chmod156 arch/x86/entry/syscalls/syscall_64.tbl:103 91 common fchmod sys_fchmod157 arch/x86/entry/syscalls/syscall_64.tbl:104 92 common chown sys_chown158 arch/x86/entry/syscalls/syscall_64.tbl:105 93 common fchown sys_fchown159 arch/x86/entry/syscalls/syscall_64.tbl:106 94 common lchown sys_lchown160 arch/x86/entry/syscalls/syscall_64.tbl:107 95 common umask sys_umask161 arch/x86/entry/syscalls/syscall_64.tbl:108 96 common gettimeofday sys_gettimeofday162 arch/x86/entry/syscalls/syscall_64.tbl:109 97 common getrlimit sys_getrlimit163 arch/x86/entry/syscalls/syscall_64.tbl:110 98 common getrusage sys_getrusage164 arch/x86/entry/syscalls/syscall_64.tbl:111 99 common sysinfo sys_sysinfo165 ... (truncated; full table at linux/arch/x86/entry/syscalls/syscall_64.tbl)166 167[DEF] SYSCALL_DEFINE0..6 macros — the upstream macros every168 sys_<name> uses. K11-B1's syscall_table.c picks up these169 handlers via the SYSCALL_METADATA registration chain.170 include/linux/syscalls.h:216 #define SYSCALL_DEFINE0(sname) \171 include/linux/syscalls.h:223 #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)172 include/linux/syscalls.h:224 #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)173 include/linux/syscalls.h:225 #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)174 include/linux/syscalls.h:226 #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)175 include/linux/syscalls.h:227 #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)176 include/linux/syscalls.h:228 #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)177 include/linux/syscalls.h:230 #define SYSCALL_DEFINE_MAXARGS 6178 include/linux/syscalls.h:232 #define SYSCALL_DEFINEx(x, sname, ...) \179 180[DEF] sys_read / sys_write / sys_close / sys_dup2 (fs/read_write.c181 + fs/open.c + fs/file.c — the file-descriptor surface182 K11-C1's R-K9-1 retirement re-routes from the JS-direct183 registries to the kernel files_struct).184 fs/read_write.c:701 ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count)185 fs/read_write.c:725 ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count)186 fs/file.c:1321 static int ksys_dup3(unsigned int oldfd, unsigned int newfd, int flags)187 188[DEF] sys_pipe / sys_pipe2 (fs/pipe.c — the kernel pipe ring189 buffer K11-C1's R-K9-1 retirement enables for cross-190 process communication).191 fs/pipe.c:1040 SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)192 193[DEF] sys_wait4 / kernel_wait4 / do_wait (kernel/exit.c — the194 kernel-side child reaping K11-C1's R-K9-1 retirement195 enables).196 kernel/exit.c:1875 SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,197 kernel/exit.c:1902 COMPAT_SYSCALL_DEFINE4(wait4,198 kernel/exit.c:1816 long kernel_wait4(pid_t upid, int __user *stat_addr, int options,199 kernel/exit.c:1680 static long do_wait(struct wait_opts *wo)200 201[DEF] sys_kill / sys_tkill / sys_tgkill (kernel/signal.c — the202 kernel-side signal delivery K11-B6's R-K8-2 retirement203 enables).204 kernel/signal.c:3845 SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)205 kernel/signal.c:4063 SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)206 kernel/signal.c:4047 SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)207 208[DEF] sys_rt_sigaction / do_sigaction (kernel/signal.c — the209 kernel-side current->sighand population K11-B5's R-K8-1210 retirement enables).211 kernel/signal.c:4182 int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)212 213[DEF] sys_setpgid / sys_getpgid / sys_setsid / sys_getsid /214 sys_getpgrp (kernel/sys.c — the kernel-side215 task->signal->pgrp surface K11-C1's R-K9-1 retirement216 enables).217 kernel/sys.c:1082 SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)218 kernel/sys.c:1181 SYSCALL_DEFINE1(getpgid, pid_t, pid)219 kernel/sys.c:1195 SYSCALL_DEFINE1(getsid, pid_t, pid)220 221[DEF] _do_fork / kernel_clone (kernel/fork.c — K11-B5+ the222 in-Worker fork path that R-K9-2's posix_spawn(2)223 partial retirement routes through).224 kernel/fork.c:2745 pid_t kernel_clone(struct kernel_clone_args *args)225 226================================================================================2272. WAS — wasm32-port/ tree228================================================================================229 230[SITE] arch/wasm32/kernel/entry.c — the K10-era wasm_syscall231 stub K11-A3 replaces with the real stack-swap.232 kernel/entry.c:5 * Both vmlinux and process Workers export `wasm_syscall`. When a process233 kernel/entry.c:18 __attribute__((export_name("wasm_syscall")))234 kernel/entry.c:19 long wasm_syscall(unsigned long nr, long a0, long a1, long a2,235 236[SITE] arch/wasm32/include/asm/thread_info.h — THREAD_SIZE pin237 (32 KiB per K4 close; the K11-A1 drift catch).238 include/asm/thread_info.h:32 #define THREAD_SIZE_ORDER 3239 include/asm/thread_info.h:33 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)240 241[SITE] arch/wasm32/kernel/clone.c — the K7/K9 thread/fork242 machinery K11-B5+ hooks signal/wait paths into.243 244[SITE] arch/wasm32/kernel/syscall_table.c — at K11-A2 time245 this file does NOT exist; K11-B1 creates it.246 (UNEXPECTED: file already exists at K11-A2 time)247 kernel/syscall_table.c:15 const void *sys_call_table[__NR_syscalls] = {248 249================================================================================2503. TLC — linux-wasm/scripts/ + Documentation/wasm/251================================================================================252 253[SITE] linux-wasm/Documentation/wasm/syscall-path-model.rst —254 the K11 opener (THIS phase's spec).255 syscall-path-model.rst:37 1. §2 architectural ground truth (citations to the spec sites)256 syscall-path-model.rst:38 2. §3 the K5–K9 shortcut state being retired257 syscall-path-model.rst:39 3. §4 per-Worker vmlinux instantiation contract258 syscall-path-model.rst:40 4. §5 ``linux.syscall`` import resolution259 syscall-path-model.rst:41 5. §6 ``wasm_syscall`` entry sequence260 syscall-path-model.rst:42 6. §7 ``sys_call_table`` population strategy261 syscall-path-model.rst:43 7. §8 ``arch_cpu_up`` / ``arch_cpu_down`` hooks262 syscall-path-model.rst:44 8. §9 ``num_vcpu`` parameter263 syscall-path-model.rst:45 9. §10 ``max_wasm_instances`` parameter264 syscall-path-model.rst:46 10. §11 R-K10-W1 inversion plan265 syscall-path-model.rst:47 11. §12 R-K8-1 / R-K8-2 / R-K9-1 / R-K9-2 / R-K9-3 retirement plan266 syscall-path-model.rst:48 12. §13 K11 sub-phase decomposition267 syscall-path-model.rst:49 13. §14 refutation budget268 syscall-path-model.rst:50 14. §15 acceptance criteria269 syscall-path-model.rst:51 15. §16 K10 close ledger amendment + scope correction proposal270 syscall-path-model.rst:52 16. §17 §20.6.1 retroactive dependency-check271 syscall-path-model.rst:53 17. Appendix A — K11 close checklist272 syscall-path-model.rst:56 1. Why this document exists separately273 syscall-path-model.rst:97 2. Architectural ground truth274 syscall-path-model.rst:175 3. The K5–K9 shortcut state being retired275 syscall-path-model.rst:252 4. Per-Worker vmlinux instantiation contract276 syscall-path-model.rst:258 4.1. Worker classes (taxonomy)277 syscall-path-model.rst:295 4.2. Spawn-time amendment to worker.mjs278 syscall-path-model.rst:304 1. Receive ``boot`` message from main thread carrying279 syscall-path-model.rst:308 2. Instantiate ``vmlinux.wasm`` first (the kernel instance for280 281[SITE] linux-wasm/Documentation/wasm/memory-model.rst §1.2 —282 the spec text for the wasm_syscall stack-swap dance283 K11-A3 implements.284 memory-model.rst:175 1.2 Syscall entry sequence (kernel-stack swap)285 286[SITE] linux-wasm/Documentation/wasm/post-link-pass-conventions.rst —287 the conventions K11 may extend if syscall-table-rewrite288 passes are needed (currently expected: NO post-link289 passes added by K11; sys_call_table is ordinary C).290 post-link-pass-conventions.rst:17 0. Why post-link surgery exists in this port at all291 post-link-pass-conventions.rst:50 1. The hierarchy of post-link tools292 post-link-pass-conventions.rst:81 2. Substitutive vs. additive — which shape your pass is293 post-link-pass-conventions.rst:143 3. Mandatory properties of a post-link pass294 post-link-pass-conventions.rst:186 4. Naming conventions295 post-link-pass-conventions.rst:203 5. Listed passes (current + planned)296 post-link-pass-conventions.rst:221 6. Anti-patterns297 298================================================================================2994. UPS — wackywasm-tools/musl-1.2.5/src/300================================================================================301 302K7/K8/K9 demo musl wrappers (already-exercised surface):303 src/dirent/opendir.c:16 __syscall(SYS_close, fd);304 src/exit/_Exit.c:6 __syscall(SYS_exit_group, ec);305 src/exit/_Exit.c:7 for (;;) __syscall(SYS_exit, ec);306 src/exit/abort.c:20 __syscall(SYS_rt_sigaction, SIGABRT,307 src/exit/abort.c:22 __syscall(SYS_tkill, __pthread_self()->tid, SIGABRT);308 src/fcntl/fcntl.c:32 if (ret >= 0) __syscall(SYS_close, ret);309 src/internal/syscall.h:395 #define __sys_wait4(a,b,c,d) __syscall(SYS_wait4,a,b,c,d)310 src/linux/membarrier.c:44 __syscall(SYS_tkill, td->tid, SIGSYNCCALL);311 src/linux/readahead.c:7 return syscall(SYS_readahead, fd, __SYSCALL_LL_O(pos), len);312 src/linux/setgroups.c:24 __syscall(SYS_kill, __syscall(SYS_getpid), SIGKILL);313 src/linux/wait4.c:14 r = __syscall(SYS_wait4_time64, pid, status, options, kru64);314 src/mq/mq_close.c:6 return syscall(SYS_close, mqd);315 src/mq/mq_notify.c:71 __syscall(SYS_close, s);316 src/mq/mq_notify.c:83 __syscall(SYS_close, s);317 src/network/if_indextoname.c:17 __syscall(SYS_close, fd);318 src/network/if_nametoindex.c:16 __syscall(SYS_close, fd);319 src/network/netlink.c:50 __syscall(SYS_close,fd);320 src/network/res_msend.c:22 if (pfd[i].fd >= 0) __syscall(SYS_close, pfd[i].fd);321 src/network/res_msend.c:306 __syscall(SYS_close, pfd[i].fd);322 src/process/posix_spawn.c:26 return __syscall(SYS_dup2, old, new);323 src/process/posix_spawn.c:70 if ((ret=__syscall(SYS_setsid)) < 0)324 src/process/posix_spawn.c:74 if ((ret=__syscall(SYS_setpgid, 0, attr->__pgrp)))325 src/process/posix_spawn.c:97 __syscall(SYS_close, p);326 src/process/posix_spawn.c:102 __syscall(SYS_close, op->fd);327 src/process/posix_spawn.c:127 __syscall(SYS_close, fd);328 src/process/posix_spawn.c:162 do r = __syscall(SYS_write, p, &ret, sizeof ret);329 src/signal/kill.c:6 return syscall(SYS_kill, pid, sig);330 src/signal/raise.c:10 int ret = syscall(SYS_tkill, __pthread_self()->tid, sig);331 src/signal/sigaction.c:54 int r = __syscall(SYS_rt_sigaction, sig, sa?&ksa:0, old?&ksa_old:0, _NSIG/8);332 src/stat/fchmodat.c:38 __syscall(SYS_close, fd2);333 src/stdio/__stdio_close.c:13 return syscall(SYS_close, __aio_close(f->fd));334 src/stdio/__stdio_read.c:12 cnt = iov[0].iov_len ? syscall(SYS_readv, f->fd, iov, 2)335 src/stdio/__stdio_read.c:13 : syscall(SYS_read, f->fd, iov[1].iov_base, iov[1].iov_len);336 src/stdio/__stdio_write.c:15 cnt = syscall(SYS_writev, f->fd, iov, iovcnt);337 src/stdio/fopen.c:29 __syscall(SYS_close, fd);338 src/stdio/popen.c:30 __syscall(SYS_close, p[0]);339 src/stdio/popen.c:31 __syscall(SYS_close, p[1]);340 src/stdio/popen.c:47 __syscall(SYS_close, p[1-op]);341 src/stdio/popen.c:57 __syscall(SYS_close, p[1-op]);342 src/stdio/tempnam.c:40 r = __syscall(SYS_readlink, s, (char[1]){0}, 1);343 344K12 surface — pty / ldisc / jobctrl wrappers (NOT yet exercised):345 346================================================================================3475. OVR — wackywasm-tools/musl-src/src_overrides/348================================================================================349 350K7/K8/K9 src_overrides existing at K11-A2 time. K11-C may351DELETE some of these as the kernel-side path takes over per352the user's clean-up-not-layer directive.353 ./env/wasm32/__init_tls.c354 ./internal/wasm32/syscall_ret.c355 ./signal/wasm32/__wasm_signal_dispatch.c356 ./signal/wasm32/sigaction.c357 ./signal/wasm32/sigsuspend.c358 ./signal/wasm32/sigtimedwait.c359 ./thread/wasm32/__set_thread_area.c360 ./thread/wasm32/clone.c361 ./thread/wasm32/pthread_sigmask.c362 363================================================================================3646. HWJ — hardwarejs/src/365================================================================================366 367[DEF] kernelSpawnHandler.ts dispatchSyscall — THE 36368 JS-direct cases K11-C deletes. Each case becomes369 "forward to vmlinux.exports.wasm_syscall" or vanishes370 entirely depending on whether it was a fast-path or371 a stand-in for a missing kernel handler.372 1039: case __NR_ioctl {373 1049: case __NR_set_tid_address {374 1060: case __NR_arch_prctl {375 1071: case __NR_read {376 1122: case __NR_close {377 1137: case __NR_dup2 {378 1154: case __NR_pipe 379 1155: case __NR_pipe2 {380 1194: case __NR_exit 381 1195: case __NR_exit_group {382 1203: case __NR_mmap {383 1246: case __NR_munmap {384 1257: case __NR_mprotect {385 1268: case __NR_brk {386 1279: case __NR_madvise {387 1287: case __NR_rt_sigprocmask {388 1300: case __NR_set_robust_list {389 1310: case __NR_clock_gettime {390 1340: case __NR_clone {391 1495: case __NR_rt_sigaction {392 1529: case __NR_wasm_spawn_image {393 1616: case __NR_wasm_spawn_image_actions {394 1768: case __NR_wait4 {395 1831: case __NR_kill 396 1832: case __NR_tkill 397 1833: case __NR_tgkill {398 1950: case __NR_getpid {399 1954: case __NR_getppid {400 1959: case __NR_getpgid 401 1960: case __NR_getpgrp {402 1966: case __NR_setpgid {403 1971: case __NR_setsid {404 1976: case __NR_getsid {405 1981: case __NR_pause {406 988: case __NR_write {407 999: case __NR_writev {408 409[K11-B] hardwarejs/src/worker.mjs — at K11-A2 time, instantiates410 ONE userspace .wasm; K11-B amends to instantiate411 vmlinux.wasm BEFORE the userspace .wasm in the same412 Worker (per syscall-path-model.rst §4.2).413 313: const instance = await WebAssembly.instantiate(module, filtered); 414 415[K11-B] hardwarejs/src/bootKernel.ts — at K11-A2 time, the416 BootKernelOptions interface does NOT have num_vcpu /417 max_wasm_instances. K11-B3 / K11-B4 add them.418 274:export async function bootKernel(opts BootKernelOptions): Promise<BootResult> {419 303: * K6 amendment (see BootKernelOptions.spawnHandler doc) 420 45:export interface BootKernelOptions { 421 422[K11-C delete-not-comment] JS-direct registries — files423 DELETED (not commented out, not left as fallbacks)424 per the user's clean-up-not-layer standing directive:425 childExitRegistry.ts (exists; 226 lines; DELETE at K11-C close)426 pipeRegistry.ts (exists; 276 lines; DELETE at K11-C close)427 fdTableRegistry.ts (exists; 252 lines; DELETE at K11-C close)428 stdinChannel.ts (exists; 163 lines; DELETE at K11-C close)429 processGroupRegistry.ts (exists; 183 lines; DELETE at K11-C close)430 childImageRegistry.ts (exists; 59 lines; DELETE at K11-C close)431 432================================================================================433End of K11-A2 source-site snapshot434================================================================================435