LeonOS Documentation

Linux ABI implementation ledger

2026-09-10 ioctl(FIOCLEX/FIONCLEX) 通用 close-on-exec 缺口修复

本轮只修复已证实的 ioctl 子命令/描述符语义缺口,不恢复 Linux ABI 扩展任务, 也不把 ioctl 整项提升为兼容。

故障与根因:原始静态 musl CPython 3.15 执行 python3 /bin/hello.py 报 can't open file '/bin/hello.py': [Errno 38] Function not implemented。 /home/xiaobai/installer-serial.log 第 1645 行附近给出直接证据:nr=2 open 返回 fd 9,随后 nr=16 args=9,5451,0,... result=-38(0x5451 = FIOCLEX), 再 close(9)、exit_group(2)。同一个二进制在宿主 Linux 上 ioctl(FIOCLEX) 成功,说明缺口在内核:kernel/ntclks/syscall.c 只在 signalfd 分支处理 FIOCLEX/FIONCLEX,普通文件走到函数末尾的 -ENOSYS。这不是缺失 open 或整个 ioctl 入口,而是已支持入口内的子命令/描述符语义缺口。

修改

证据(分层)

复现


python3 build.py run kernel
python3 build.py run userland
python3 build.py test linux-ioctl-cloexec
python3 tools/test_linux_ioctl_cloexec.py --guest --terminal

--guest 使用仓库固定 GRUB 模块(与 build.py 同源);改用宿主 GRUB 2.14 生成的 EFI 镜像曾在本 ISO 布局上崩溃;脚本优先使用仓库版本,仅缺失时回退宿主。

返修检查点:最初把 O_PATH 转换放进通用 fd 分配器,误清除 epoll 类型位, 且 ioctl 对未知命令没有先验证 fd。新增内核测试分别出现 epoll 识别断言失败 和无效 fd EBADF 断言失败后,修复上述两处边界。原 32 项成功证据保留在 build/ioctl-cloexec/evidence.before-rework.txt、guest-serial.before-rework.log。 返修构建输出见 rework-build.log,扩展验证输出见 rework-validation.log (均在 build/ioctl-cloexec/)。未重新打包普通发行和安装器镜像。

未完成:ioctl 整项仍为“有分发、未认证兼容”。其余 socket/设备/文件 ioctl 请求、i386/x32 compat ioctl、O_PATH 的其余 FMODE_PATH 限制 (read/write/fchdir 等)、完整 LTP ioctl 用例、SMP 压力与 VMware 运行 均未完成,不能据此提升整项状态。

2026-09-10:暂停 ABI 扩展并保存工作区检查点

按用户要求,Linux ABI 后续扩展暂时暂停。保留当前实现和未完成清单; 此次提交不把局部验证通过的 syscall 提升为完整兼容。

提交前重新运行 component-config、musl-gcc-package、live-iso、Linux vfork-stack、threads、resources、sysv-msg、sysv-sem、process-vm 和 socket-batches 定向测试,均通过。未在此次清理中重复构建或启动 QEMU; 镜像及 QEMU 的实际验证范围仍以下方先前记录为准。

清理前已逐字节校验并归档 460 个日志、截图及诊断文件。此工作站归档位置: /home/xiaobai/Projects/Projects/LeonOS-4-test-archives/checkpoint-20260910-173155.tar.gz。 归档保留原始项目相对路径;本文旧 build/... 日志引用可从归档查阅。 归档不进入 Git。已删除专用 GCC 探针临时目录、过时实验 ISO、旧 exFAT 镜像 及 Python 缓存;保留最新桌面 ISO、installer ISO、VMDK、SDK 和构建依赖缓存。

2026-09-10 GCC 修复复核:vfork 边界与同步缺页信号

复核确认此前 GCC 编译链能够运行,但其异常退出测试接受正常退出码 14, 不能证明 Linux SIGSEGV 语义。相同宿主/来宾测试现共用 tools/tests/vfork_linux_edges.c,原来两个接受 exit(14) 的断言收紧为 WIFSIGNALED && WTERMSIG == SIGSEGV。修复前 QEMU 记录 build/gcc-probe/guest-serial.edges-before.log 的 6 项失败:备用栈继承、 STOP/CONT、定向定时器、同步缺页处理器、子进程异常状态及栈溢出状态。 这纠正了先前报告对“按 Linux 一样终止进程”的过度表述。

实际修复:

新增 6 组共同用例:备用栈继承、STOP/CONT、定向定时器、clear_child_tid 完成 顺序、父进程 SIGTERM,以及缺页/保护错误/栈溢出在备用栈上的 SIGSEGV 处理。 处理器核对 si_code、si_addr、CR2 和 trap 14。CHILD_CLEARTID 用 raw clone, 因为 musl 的公开 clone() 有意在用户态拒绝该 flag,不能误判为内核 EINVAL。

验证:宿主 raw 对照、真实信号队列/帧及资源限制 ASan/UBSan、内存与描述符 回归通过;48 个 UAPI 头文件与 Linux ABI 契约检查通过。新内核/SDK/探针和 独立 ext2 测试盘构建通过。QEMU 1/2 vCPU 的新增 6 组、原 8 组生命周期回归 及 GCC 六步骤均通过,最终 DONE failures=0,证据为 build/gcc-probe/guest-serial.edges-final-1vcpu.log 和 build/gcc-probe/guest-serial.edges-final-2vcpu.log。musl ABI 宿主静态/动态 回归也通过,见 build/gcc-probe/musl-abi-edges.log。这不等同完整 SMP 压力认证。 最后补入 PTY 统一清理后,PTY/线程宿主回归、构建及同一 GCC 全流程再次通过, 最新证据为 build/gcc-probe/guest-serial.edges-final-pty-2vcpu.log;单 CPU 结果来自该 PTY 清理增补前的同组修复。

另发现未完成的 mmap 契约:fork 前未触页的 MAP_SHARED|MAP_ANONYMOUS 页面, 父子首次缺页会各自分配不同物理页。先前共享用例在 fork 前写入,因而未覆盖; 见 guest-serial.edges-after-2vcpu.log 中共享握手失败及 syscall_mm.c:task_map_anonymous_page 的无共享 backing 分配路径。 SIGTERM 用例改用 pipe 独立验证信号生命周期,本项已单独列入 mmap 的 CSV 证据,尚未修复。还需完整共享匿名对象、bprm_stack_limits、其他 12 类 rlimit、 namespace/ptrace/core dump、完整信号竞争、LTP、VMware 及发布镜像工作流验证。 本轮未重新生成普通/installer ISO,也未执行桌面交互和完整 LTP;只构建、启动 独立 ext2 GCC 测试盘。原工具链四个二进制 SHA256 与初始归档一致。 CSV 仍为 115 missing、5 completed、81 routed、157 implemented、17 reserved; 本次没有把任何 syscall 升级为完整兼容。

2026-09-10 CLONE_VFORK/RLIMIT_STACK 修复与预构建 musl GCC 全链路

历史检查点;后续复核发现的信号/退出边界、严格测试与修正见上一节。

本轮按用户要求复核旧日志后,实际补齐 native clone(56) 的 CLONE_VFORK 生命周期和真实 CLONE_VM 共享、vfork(58) 的 Linux 语义、getrlimit/ setrlimit/prlimit64 的 RLIMIT_STACK,并让 ELF 加载器接受无 PT_INTERP 的 ET_DYN static PIE(预构建 as/ld 正是 static-pie)。依据固定本地 Linux v6.12 的 kernel/fork.c、kernel/exit.c、fs/exec.c、 mm/mmap.c:acct_stack_growth、kernel/sys.c:do_prlimit、include/uapi/ linux/resource.h 的 _STK_LIM/INIT_RLIMITS 及既有调度/信号实现, 没有修改预构建 GCC、musl 或应用。

clone/vfork 生命周期

RLIMIT_STACK

实际验证

明确未完成

2026-09-10 预构建 musl GCC 来宾实测(修复前基线)

修复前证据,保留用于对照;修复结果见上一节。

用户提供 dyne-gcc-musl-x86_64.tar.xz,GCC 版本 15.1.0。归档 SHA256: 31420e4f978e7ccbcc597ca5e18c2dcbe640ea6985ed6325112d8a171a72ece3。 直接解包到来宾 /opt/dyne,没有修改或重编译 gcc、cc1、as、ld;四个程序的 SHA256 保存在 build/gcc-probe/binary-sha256.json。gcc 与 cc1 是静态链接的 native x86-64 ELF,没有 PT_INTERP,不依赖 LeonOS 的动态加载器或 glibc。

实际环境:QEMU/KVM、OVMF、q35、host CPU、1 vCPU、4 GiB RAM;独立 GPT 测试盘包含 FAT32 ESP 和 ext2 根分区,以 snapshot 模式启动当前构建的内核、 loader 和 middlelayer,复用现有 build/esp 的用户态文件。不是 installer 或 ISO 发布验证,也未验证 VMware。启动探针自动执行以下步骤:

步骤LeonOS 实际结果
gcc --version输出 GCC 15.1.0,退出 0
gcc -v输出构建配置,退出 0
gcc --sysroot=... -E gcc-probe.c退出 1,无法通过 posix_spawn 启动 cc1
gcc --sysroot=... -v -O0 -c gcc-probe.c同样退出 1
链接及运行生成程序编译失败,未执行

直接阻塞是 clone(56) 的参数语义缺失:来宾日志第 631-632、910-911 行显示 flags 为 0x4111 = CLONE_VM | CLONE_VFORK | SIGCHLD,返回 -38 / ENOSYS。 sched_clone_current 的 supported mask 未包含 CLONE_VFORK,实际在 flags 校验处拒绝;不是缺少 56 号分发入口。GCC 随后报告 cannot execute .../cc1: posix_spawn: Function not implemented。 posix_spawn 是 libc API,本次触发的 raw syscall 是 clone。项目 musl src/process/posix_spawn.c 使用相同 flags;原预构建 GCC 在宿主 strace 中 也确实使用该组合。宿主运行原 GCC 编译空 C 翻译单元退出 0,产出目标文件, 证据为 build/gcc-probe/host-compile.trace 和 host-empty.o。

另有 prlimit64(302, RLIMIT_STACK) 和回退 getrlimit(97, RLIMIT_STACK) 均返回 ENOSYS:四次 GCC 启动各出现一对,共 8 次;资源编号为 3。 process_resource_limit 当前只支持 NOFILE、AS、SIGPENDING,未实现 STACK。 这些失败在本次调用中非致命,GCC 继续执行,不能与 clone 的直接阻塞混称。 此次跟踪总共观察到 10 次 ENOSYS,均来自上述三个编号。cc1、汇编器和链接器 尚未在来宾中执行,不能据此声称补齐这三个缺口便满足整个 GCC 工具链。

后续修复需要真实 CLONE_VFORK 父调用线程等待、共享地址空间、子进程 exec/exit 释放及唤醒生命周期;不能只放行 flag 或把 clone 强制改成 fork。RLIMIT_STACK 也需要真实限制值、继承、修改及栈增长约束。本次仅增加诊断与测试设施,未修改 这些 ABI 行为,也未将相关调用标记完成,CSV 总体状态计数不变。

重现镜像构建(需已有普通系统的 build/esp 暂存树):


LEONOS_GCC_ARCHIVE=/home/xiaobai/下载/dyne-gcc-musl-x86_64.tar.xz python3 build.py run gcc-probe-image
qemu-system-x86_64 -enable-kvm -cpu host -machine q35 -m 4096M -smp 1 \
  -bios /usr/share/edk2/x64/OVMF.4m.fd -display none \
  -serial file:build/gcc-probe/guest-serial.log \
  -device VGA,xres=1280,yres=720 -netdev user,id=net0 -device e1000,netdev=net0 \
  -drive file=build/gcc-probe/gcc-probe.vmdk,if=none,id=sata0,format=vmdk,snapshot=on \
  -device ich9-ahci,id=ahci -device ide-hd,drive=sata0,bus=ahci.0 -no-reboot -no-shutdown

本次镜像构建退出 0,来宾报告 [gcc-probe] DONE failures=2;QEMU 随后经 QMP 退出。autospawn=gcc 启动测试器,syscall-trace=/opt/dyne/ 仅跟踪匹配可执行 路径的 syscall 编号、六个原始参数和返回值;普通启动默认关闭。完整来宾证据: build/gcc-probe/guest-serial.log。本节保留关键失败证据,避免后续清理 build 日志后丢失结论。

2026-09-10 SysV 信号量实现检查点

新增 semget(64)、semop(65)、semctl(66)、semtimedop(220) 的 native x86-64 分发与实际信号量数组,状态为 implemented_pending_runtime / partial_host。 当前 375 项:115 项缺少分发、154 项实现待补齐或验证、84 项原有入口未完整认证、 5 项历史完成标记、17 项 Linux 保留/ni。下文计数为历史快照,完整范围未缩减。

依据本地 Linux v6.12 ipc/sem.c、ipc/util.c、kernel/fork.c、kernel/exit.c、 kernel/signal.c、arch/x86/include/uapi/asm/sembuf.h 和 IPC UAPI。

实际验证:

明确未完成:IPC/user/PID namespace、可配置 LSM、/proc/sysvipc/sem、信号量 sysctl/next_id/扩展 ID 配置、unshare(CLONE_SYSVSEM)、完整 PID 对象引用与复用。 当前固定 Linux 默认上限并使用全局执行锁;Linux 的对象细粒度并发、远端 CPU 停止/退出/exec 竞争及实际调度压力尚未验证。超时仍受现有 100 Hz 唤醒机制限制, 尚未实现 Linux hrtimer/timer_slack 的完整行为。以上仍在任务范围内,不能把这 四项标为 completed,也不能以局部宿主通过代替 LeonOS 完整运行认证。

2026-09-10 SysV 消息队列实现检查点

新增 msgget(68)、msgsnd(69)、msgrcv(70)、msgctl(71) 的 native x86-64 分发及真实队列实现,状态为 implemented_pending_runtime / partial_host。 当前 375 项:119 项缺少分发、150 项实现待补齐或验证、84 项原有入口未完整认证、 5 项历史完成标记、17 项 Linux 保留/ni。下文计数均为历史快照,完整范围未缩减。

依据本地 Linux v6.12 ipc/msg.c、ipc/msgutil.c、ipc/util.c、 include/linux/ipc_namespace.h、kernel/groups.c 和 native IPC UAPI。

实际验证与纠正:

明确未完成:IPC/user/PID namespace、可配置 LSM、/proc/sysvipc/msg、消息队列 sysctl 调整/扩展 ID 模式及 checkpoint 的 next_id 接口;与完整 PID 对象引用和 复用的集成;Linux 的 RCU/对象细粒度并发、停止/继续及多核实际调度压力验证。 当前固定上限取 Linux 默认值,系统使用单 IPC namespace 和现有全局执行锁。 这些配套缺口仍在任务范围内,不能把本批四项标为 completed。

2026-09-10 process_vm 实现检查点

新增 process_vm_readv(310)、process_vm_writev(311) 的 native x86-64 入口。 两项为 implemented_pending_runtime / partial_host。当前 375 项:123 项缺少 分发、146 项实现待补齐或验证、84 项原有入口未完整认证、5 项历史完成标记、 17 项 Linux 保留/ni。入口计数不等同完整兼容率,所有旧缺口继续在任务范围内。

依据本地 Linux v6.12 mm/process_vm_access.c、lib/iov_iter.c、mm/gup.c、 kernel/fork.c:mm_access、kernel/ptrace.c:__ptrace_may_access、 security/commoncap.c:cap_ptrace_access_check 和 kernel/cred.c:commit_creds。

实际验证:

明确未完成:用户地址空间仍受 LeonOS 512 MiB 布局限制;memfd/shm 目前标记为 设备映射,本接口因而拒绝,不能据 Linux 的 MMIO 拒绝规则宣称这些普通内存对象 已兼容。共享文件页写回、dirty 跟踪、完整页固定与并发 unmap/truncate/exec、 多核 TLB/COW 竞争待完善;全局执行锁和远端缺页等待不等同 Linux 可中断的 exec_update_lock/mmap_lock。user/PID namespace、可配置 LSM/Yama、ptrace/exec 凭据及 suid_dumpable=2、setuid/capability 全部契约仍未完成。支持本批复制路径 不表示这些两项已完全复刻 Linux 6.12,不能标为 completed。

2026-09-10 signalfd 实现检查点

新增 signalfd(282)、signalfd4(289) 的 native x86-64 入口和真实信号队列读取。 两项状态为 implemented_pending_runtime,验证范围为 partial_host。当前 375 项: 125 项缺少分发、144 项实现待补齐或验证、84 项原有入口未完整认证、5 项历史完成 标记、17 项 Linux 保留/ni。下文旧检查点计数为历史快照,全部未完成项仍在范围内。

依据本地 Linux v6.12 fs/signalfd.c、fs/anon_inodes.c、fs/read_write.c、 fs/ioctl.c、lib/iov_iter.c 及 kernel/signal.c。

实际验证:

未完成的具体语义:POSIX timer 的预分配 siginfo/overrun、SIGCHLD 和其他信号源 仍需与新队列完整整合;当前字段转换正确不代表源头信息完整。匿名 inode 的真实 元数据、fstat/fstatfs、共享 inode chmod/chown、procfs fd/fdinfo 尚未实现,当前 旧 stat 路径仍把 signalfd 当设备节点。poll/epoll 仍依赖既有扫描模型,缺少完整 Linux sighand waitqueue 注册及 fork 后 epoll 唤醒关系。默认致命信号的组退出处理、 完整 SMP 和 fd 关闭复用/exec 竞争仍需继续实现及运行验证;本批不能认证完全兼容。

2026-09-10 消息批量调用实现检查点

新增 recvmmsg(299) 与 sendmmsg(307) 的 native x86-64 入口和实际 Unix socket 批量处理,状态为 implemented_pending_runtime。当前 375 项:127 项缺少分发、 142 项实现待补齐或验证、84 项原有入口未完整认证、5 项历史完成标记、17 项保留/ni。 下文旧检查点中的计数是当时快照。所有剩余调用及已有实现缺口仍在任务范围内。

依据本地 Linux v6.12 net/socket.c 的 sys_sendmmsg、do_recvmmsg、 sys_recvmsg、copy_msghdr,net/unix/af_unix.c 和 lib/iov_iter.c。

实际验证:

明确未完成的语义:INET sendmsg/recvmsg 后端仍不具备 Linux 消息接口,批量调用对此 返回 EOPNOTSUPP;需继续实现协议功能,不能把它当成有效 Linux 配置裁剪。Unix OOB、 完整辅助数据/错误队列、缓冲限制和并发也未齐全。iovec 仅在单次处理期间捕获,跨阻塞 恢复仍重新读取当前条目的用户头/向量、发送载荷和控制消息,尚需保留整个在途消息。 流式接收仍预验证数据缓冲区,辅助数据/地址输出也有提前验证,跨页部分复制副作用 未完全一致。信号与新数据同时到达时,完成部分 WAITALL 后是否继续消费后续条目 仍需改进;不因此宣称信号/重启完全一致。需验证完整 SMP、close/fork/exec 竞争及 目标任务缺页失败路径。这两项及所有上述配套缺口均未达到完整 Linux 6.12 兼容。

2026-09-10 siginfo 队列实现检查点

本批新增 rt_sigqueueinfo(129)、rt_tgsigqueueinfo(297),状态为 implemented_pending_runtime。当前 375 个编号中:129 项 missing_dispatch、 140 项 implemented_pending_runtime、84 项 routed_not_certified、 5 项历史 completed、17 项 Linux 保留/ni。入口数量不表示完整兼容率。

对照本地 build/linux-6.12/kernel/signal.c 的 copy_siginfo_from_user、 known_siginfo_layout、do_rt_sigqueueinfo、do_rt_tgsigqueueinfo、 check_kill_permission、send_signal_locked、collect_signal、 next_signal、do_sigtimedwait,及 kernel/fork.c 的默认资源限制。

实际验证:

剩余具体范围仍在任务内:POSIX timer 仍用旧 pending 位与 timer_pending 位, 尚缺独立预分配 siginfo、完整 sigval/overrun 及与用户实时信号混合排队语义; SIGCHLD、异步 I/O 等其他信号源还需迁移。init 的特殊保护、ptrace、namespace、 LSM、core dump、完整 job-control/kill 进程组规则尚未齐全;高精度等待仍受 tick 调度限制,多核高压并发、完整 fork/exec/exit 实际执行及 guest 原始调用待验证。 这两项不能据本批通过的子集被标为完整 Linux 6.12 兼容。

2026-09-10 符号链接实现检查点

本批新增 symlink(88)、symlinkat(266) 实现,并补齐 ext2 的链接对象与 readlink/readlinkat 路径。两项状态为 implemented_pending_runtime,不是完整 Linux ABI 认证。CSV 当前共 375 项:131 项缺少分发、138 项新增实现待补齐或验证、 84 项原有入口未完整认证、5 项历史任务完成标记、17 项 Linux 保留/ni。

实际验证:python3 build.py test storage-rename 通过;使用真实 ext2 实现和 ASan/UBSan,覆盖 1 KiB/4 KiB 块、目录 filetype 开/关、59/60/61/255/1023/4095 字节目标、截断、大小写区分、硬链接和重命名生命周期;三个镜像均通过 e2fsck -f -n。 python3 build.py test linux-permissions 通过,包括链接后的 ..、权限检查、 nofollow/parent 策略、40/41 次跟随及链接 mode/owner/group。 新增 tools/tests/symlink_abi_test.c 使用 Linux 头文件和 raw syscall,并纳入 musl 探针的 --case symlink_syscalls。该程序在宿主 Linux 7.2.2-1-cachyos-bore-lto 通过;这不是 LeonOS 或 Linux 6.12 运行结果。 python3 build.py run kernel 和 python3 build.py run musl-probes 均构建通过, 静态与动态 musl 探针都包含新用例。宿主运行静态探针的 symlink_syscalls 子项 通过,但完整程序退出 1:既有 startup 检查固定预期 SCHED_FIFO 设置失败并返回 EINVAL,宿主结果不符合该预期。未改动这一断言,也未将整套探针记作通过。 本批没有构建 ISO、启动 QEMU/Vim 或验证 VMware。

仍需实现或验证的具体范围:完整 4096 字节 pathname/255 字节组件及目录 fd 的 inode 路径解析、O_PATH|O_NOFOLLOW 和空路径 fd 的 rename/unlink 后生命周期、 protected_symlinks/capability/ACL 权限矩阵、xattr 块引用与磁盘错误回收、完整 atime/ctime 和父目录时间戳、跨目录 rename、mount 并发与 guest raw syscall 执行。 这些缺口及 CSV 的所有剩余调用继续属于目标范围,不能把本批局部通过计为整项完成。

订正旧 hard-link 检查点:links_count 只跟踪目录引用。 storage_unlink -> ext2_unlink -> ext2_destroy_inode 在最终目录项删除时仍直接 回收 inode,并没有检查打开 fd 的引用。旧文档和 CSV 的“保持 open-file lifetime” 表述没有源码依据,已更正;最终 unlink 后的 fd 生存期仍未实现完整 Linux 语义。

2026-09-10 current continuation checkpoint

2026-09-10 sched_attr ABI correction

2026-09-10 utime family audit correction

2026-09-10 futex_waitv checkpoint

2026-09-10 formal Vim/ncurses and image checkpoint

2026-09-10 flock checkpoint

Scope remains all 375 native Linux v6.12 syscall rows and all B01-B46 groups. The original 17 Linux reserved/ni numbers remain excluded from new functionality. No syscall is certified from a dispatch entry, compilation, or a libc wrapper.

2026-09-10 utimensat checkpoint

2026-09-10 rseq checkpoint

Status vocabulary: unprocessed (outstanding implementation remains), implemented_pending_validation, verified, blocked (a concrete external blocker must be named). A group with partial fixes and known missing behavior remains unprocessed; its completed subparts are recorded separately below.

2026-09-10 sched_attr checkpoint

2026-09-09 futex2 and clone3 checkpoint

2026-09-08 musl default / PTY and process-session checkpoint

2026-09-08 raw filesystem, memory and poll checkpoint

Final source/header cleanup checks

musl-only-release-build.log rebuilds the full normal/installer/SDK release with -nostdinc, musl headers and Clang builtin headers. All 26 retired standard-header overrides in userland/libc/include and the non-musl syscall prototype branch are deleted. Canonical LeonOS extensions and curses remain. musl-only-release-closure.log validates ordinary ESP/ISO (78 ELF each) and installer staging (95 ELF). The extracted full SDK builds dynamic/static examples in sdk-musl-only-{dynamic,static}.log; source SDK snapshots are refreshed from that archive. musl-only-input-after.log runs all six input/IPC fixtures successfully after giving host test doubles explicit declarations.

musl-removal-glx-serial.log and glxgears-qmp-smoke.png show software gear rendering and Escape exit 0. The original QMP harness reported failure because it searched only an obsolete task-creation log format; its PID extraction now accepts the actual exec record and requires exit 0 for that PID. The corrected assertion passes the captured log and rejects failed-exit/wrong-PID controls; a fresh end-to-end run of that revised harness remains pending. musl-removal-stardust-test.log cannot validate Stardust: the selected profile has build/image/entry/sdk all false for stardusthello. No runtime pass is claimed; its consumer was migrated to musl stat in source.

Group Status

IDStatusImplemented or observed evidenceRemaining contract
B01implemented_pending_validationNative syscall/LSTAR used by static/dynamic musl probes and GUI servicesExhaustive register, entry/return and signal interaction tests
B02implemented_pending_validationContiguous argc/argv/envp/auxv; independent non-null AT_EXECFN; empty argv normalization; guest startup passesArgument/environment limits and complete exec error-path tests
B03unprocessedNative clone shares MM/files/fs/sighand as requested; per-thread TLS with Linux FS/clone address validation, deferred clear_child_tid registration and shared-mm exit rules, futex queues, robust owner death, create/join/detach/cancel and mimalloc contention pass static/dynamic guest probes; 14 unmodified LTP/Open POSIX pthread and synchronization tests exit 0clone3, PI futexes, complete clone flags and errors; AP user scheduling and TLB shootdown; broader cancellation/restart coverage
B04unprocessedActual upstream musl interpreter loads five GUI services; shared ELF file-page zero-fill collision fixedFull ET_EXEC+interpreter/static PIE coverage, malformed ELF/lifetime tests, all application ports
B05implemented_pending_validationpause=34; nice moved to private extension; shared number tableNative signal-driven pause interruption test
B06unprocessedNative 144-byte stat; real mode/UID/GID in guest; ext2 inode/nlink/blocks/timestamps read from disk and debugfs cross-checkedFAT/exFAT inode identity and timestamps; stable fd metadata after rename/unlink; complete device metadata
B07unprocessedNative musl proc getdents64 passes: 19-byte header, aligned records, writable usercopy, short-buffer cursor retention and task traversalOrdinary directory read semantics, offsets, seek, inode/type identity and lifecycle
B08verifiedActual Picolibc sysroots and musl use O_NONBLOCK=0x800; raw fcntl/accept EAGAIN pass in guest; installer Logo regression reproduced and repairedVerification is limited to this constant-drift item
B09unprocessedShared fcntl commands; flag paths exercised by musl probeLocks, ownership, every command/flag, shared status flags and fd table limits
B10unprocessedGuest creation mode/umask/DAC and directory-relative openat pass; no temporary cwd mutation; component traversal checks precede dot-dot normalizationFull open flags, symlinks, O_PATH/O_TMPFILE, trailing slashes and descriptor-relative ancestor semantics
B11unprocessedReference-counted OFDs shared across fork/dup/SCM_RIGHTS; CLONE_FILES and exec detachment; blocked Unix read/recv/readv retain their original OFD across another thread closing and reusing the fd; common lowest-free allocation includes fd 0/3PTY/INET ownership and remaining blocking operations
B12unprocessedCommon open/pipe/socket/SCM/dup/PTMX allocator; fd 3 is available; dup2 grows the table after retaining its source, preserves the target on failure and honors the numeric fd limit; native and sanitizer tests cover fd 700, lowered limits, stdio reuse and allocation failureComplete races and fd object ownership; remaining fcntl commands and flags
B13unprocessedRepeated close returns EBADF; closing implicit PTY stdio now releases its fd; raw close truncates its unsigned-int argument; ordinary desktop background command regression repairedMaster/INET duplicate and inherited references, last-close semantics and cleanup
B14implemented_pending_validationftruncate no longer assigns file offsetIndependent native syscall regression for offsets and failure paths
B15implemented_pending_validationRaw getcwd byte count and libc pointer conversion; LTP getcwd01 all five assertions pass with exit 0Deleted/renamed cwd, path limits and full size/error coverage
B16unprocessedActual owner/group/other DAC; 32-bit UID/GID; chmod/chown/fchmod/fchown; sticky/setgid inheritance; native musl probes and LTP fchmod01/chown01 pass; desktop controls and commands exercisedFAT/exFAT ctime; fd identity after rename/unlink; setuid/setgid exec; fsuid/capabilities; atomic metadata operations and full special-bit semantics
B17unprocessedSame-directory replacement on FAT32/exFAT/ext2; real Unix socket nodes with DAC/umask and unlink/rename namespace updates; ext2 socket create/replace/unlink independently checked by debugfs/e2fsckCross-directory rename; stable inode/dentry lifecycle across unlink/rename/open descriptors; error/crash transactions; append atomicity
B18implemented_pending_validationpipe2 validates flags before allocation; writable usercopy; common fd allocation and rollback including stdio; native descriptor-exhaustion tests retain the user's output array and release the partial allocationBroader aliases/fork, concurrent close and endpoint lifetime tests
B19unprocessedSmall nonblocking pipe writes checked for atomicity; EPIPE/SIGPIPE path; QEMU shell pipeline returns 5Blocking writer queues, partial writes, interruptions, endpoint references and concurrency
B20unprocessedPROT_NONE and MAP_FIXED_NOREPLACE; guest MAP_SHARED anonymous memory retains identity at fork; anonymous fd ignored; devzero backed by real RAM256 MiB user VA layout, eager commit, full flags, shared file writeback, ranges/offsets and backing-object references
B21unprocessedGuest NONE/RW data preservation, unmapped ENOMEM and shared-readonly EACCES; latest LTP mprotect01 has three TPASS and exit 0 after native signal repairCross-VMA transactions, Linux W+X policy, complete rollback and SMP TLB coherence
B22implemented_pending_validationUnmap supports holes and owned PROT_NONE pages; host ownership tests passComplete range splitting, backing references and SMP tests
B23unprocessed64-bit pending/mask storage; native signal 33 cancellation and high-number signal tests; tkill/tgkill permission and TGID checks; fatal signals terminate the groupRealtime signals still coalesce in a bitset; siginfo source/queues and complete group stop/continue/default semantics
B24unprocessedCanonical Linux sigaction flags and record; query no longer resets action; CLONE_SIGHAND shares actionsPremature restorer rejection; SA_NOCLDWAIT/SA_NOCLDSTOP and complete action/error semantics
B25unprocessedFull 8-byte stored mask, NULL-mask query and writable usercopy repaired; shared process pending is separate from TID pending; eligible thread wakeup and blocked/pending/unblock tests passRealtime signal queues, complete siginfo and exhaustive mask/error tests
B26unprocessedNative rt_sigframe/ucontext/siginfo, 128-byte red zone, altstack, FXSAVE/FXRSTOR and register/mask restoration; musl header offsets independently checked; guest altstack/SIMD/cancellation passComplete siginfo contents; bad-frame forced SIGSEGV; MXCSR CPU mask; XSAVE is disabled by current CPU configuration
B27unprocessedInterruptible sigsuspend blocks with temporary mask, delivers handler and returns EINTR; saved pre-suspend mask restored from native frameNested/default-action and concurrent signal edge cases
B28unprocessedShared-resource exit, group wait, worker exec/CLOEXEC isolation; read/futex restart; nanosleep and timed futex/socket waits return EINTR despite SA_RESTART; partial WAITALL returns its bytesTrue vfork; full wait4 rusage/options; complete stop/continue and restart_syscall semantics
B29implemented_pending_validationNative timespec/pointer validation, zero sleep, retained deadline, saturation/rounding and relative remaining-time copy; actual implementation passes host sanitizer tests and native guest interruption testsExhaustive signal/stop/restart and extreme-duration scheduling tests
B30unprocessedRealtime uses wall-clock subsecond state; monotonic uses ticks; reported resolution is actual 10 ms; clock_nanosleep interruption and native alarm/getitimer/setitimer ITIMER_REAL with periodic rearm and exec preservation testedCPU/dynamic clocks, ITIMER_VIRTUAL/ITIMER_PROF, other timers, clock adjustment wakeups, settime privilege/precision and complete restart behavior
B31unprocessedActual NOFILE/AS soft/hard limits, prlimit64, shared pthread and fork/exec inheritance pass native tests; existing higher fds survive lowering NOFILEResources other than NOFILE/AS, full enforcement, capabilities, reaped PID and exec AS limits
B32implemented_pending_validationRaw getpriority encoding adjustedNative process/group/user selection and permission/range tests
B33unprocessedRaw getaffinity returns 8 copied bytes; 32-bit PID/length, oversized and short masks, writable output, ESRCH/EFAULT order and cross-user EPERM pass native tests; musl pthread_get/setaffinity_np pass in the native musl SDKCapability/cpuset/hotplug rules, exited-task lifetime, AP scheduling and full scheduler policy/flag semantics
B34unprocessedAudit distinguishes libc reboot API from raw syscallLinux magic values, command, privilege and argument contracts
B35unprocessedRefcounted supplementary groups inherited at fork; getgroups/setgroups widths/order/privilege and group DAC checked by native musl probesComplete UID/GID/fsuid/capability rules; saved IDs; setuid side effects; signal target permissions and lifetime
B36unprocessedUnix STREAM/DGRAM/SEQPACKET, pathname/abstract/autobind, packet boundaries, MSG_TRUNC/PEEK/WAITALL, credentials, blocked fd pinning, readv/writev, shutdown/readiness, FIONREAD and peer-reset behavior pass native guest probes; accepted address metadata no longer shadows a listener bindingComplete flags, options, low-water marks and resource/concurrency cases; UDP/IPv6/INET server behavior
B37unprocessedUnix SO_TYPE/ERROR/PEERCRED/PASSCRED/ACCEPTCONN/DOMAIN/PROTOCOL/RCVLOWAT, short buffers, raw write SIGPIPE; OLD/NEW timeouts, WAITALL/PEEK/lowwater and EINTR; SO_ERROR consumes peer reset once; FIONBIO updates the shared OFDSocket buffer limits and remaining options; INET unsupported options still need repair
B38unprocessedLength-delimited abstract addresses and 108-byte paths; native output truncation and cached peer name; accept allocates before dequeue with rollbackAll address errors, concurrent namespace changes, INET address contracts
B39unprocessedSCM_RIGHTS OFD references/CLOEXEC/CTRUNC/PEEK/discard, Linux stream ancillary barriers and 80 cycles; SCM_CREDENTIALS/SO_PASSCRED, sender validation, stream credential boundaries and zero-byte datagrams; IPC framing/partial writes and explicit service socket modesAll resource exhaustion/concurrent close cases; partial IPC state with direct close(fd); concurrent same-fd consumer sends
B40unprocessedShared native termios 36/44-byte records and flags/cc indexes; raw PTY, TIOCSCTTY and forkpty pass; ioctl request width and TCSETSF input flush repairedSeparate master/slave termios, locking, controlling tty ioctls, VMIN/VTIME, canonical EOF, echo/output processing, queues and complete hangup semantics
B41unprocessedQEMU installer framebuffer renders and keyboard events reach GUIfbdev exact layouts, pan/variable mode errors and reported capabilities
B42unprocessedHistorical BLKROGET encoding audit retainedCorrect request encoding, native block ioctls, usercopy and error tests
B43unprocessedHistorical EVIOCGRAB argument audit retainedValue-vs-pointer correction and native evdev behavior tests
B44unprocessedReal /proc/PID and /proc/self parent directories fix task traversal; getdents64 enumerates live tasks; MemAvailable enables LTP startup; /proc/PID/status provides real IDs and resident RAM, and task snapshots resolve usernames from passwdLinux stat/cmdline format, remaining status fields, thread/self links, access control, offsets and lifecycle
B45unprocessedNative poll validates writable revents, 32-bit nfds, regular-file EOF readiness, POLLNVAL, signal interruption and poll(NULL,0,-1); no-mask ppoll timespec path, basic epoll create/ctl/wait/oneshot packed-event behavior, and timerfd periodic read/poll behavior pass static/dynamic musl QEMU probes (/tmp/leonos-epoll-guest-20260910c.log, /tmp/leonos-timerfd-guest-20260910b.log)ppoll atomic signal masks, pselect, epoll temporary signal masks, timerfd clock-adjustment/cancel-on-set, and complete wait queue/event/device/resource semantics
B46unprocessedExisting mount subset retainedFilesystem-specific flags/errors, privilege, mount lifetime, busy checks, umount2 semantics

Verification Evidence

Permission Integration Checkpoint

Account and Rename Checkpoint

LTP Guest Results

Unmodified LTP source revision: 3a64d78f58bdceba93ed321e91215fb969a047ed. Latest evidence: build/musl/tls-scm-ltp-serial.log. Sources and expected results are unchanged. The 14 pthread/synchronization cases are upstream Open POSIX 1-1.

TestResultRemaining failure
getcwd01PASS, exit 0, five assertionsBroader syscall coverage remains
fchmod01PASS, exit 0, eight mode casesNot full descriptor lifecycle certification
chown01PASS, exit 0Only this LTP case plus separate musl matrix
mprotect01Three TPASS; exit 0Earlier signal 48 warning resolved
fcntl01Exit 0Earlier signal 48 warning resolved
fstat02TBROK, exit 2link ENOSYS
chmod01TBROK, exit 2Timestamp setup via utimes/utimensat ENOSYS
pthread_create_1-1PASS, exit 0Broader clone/attribute coverage remains
pthread_join_1-1PASS, exit 0Not all join/detach races
pthread_mutex_lock_1-1PASS, exit 0PI futex operations remain unsupported
pthread_cond_wait_1-1PASS, exit 0This does not certify alarm or timed waits
pthread_cancel_1-1PASS, exit 0Asynchronous cancellation case
pthread_key_create_1-1PASS, exit 0Key creation case, not exhaustive TLS lifecycle
pthread_barrier_wait_1-1PASS, exit 0Barrier lifecycle only
pthread_rwlock_rdlock_1-1PASS, exit 0Read/write lock edge cases remain
pthread_once_1-1PASS, exit 0Once recursion/error paths remain
pthread_mutex_timedlock_1-1PASS, exit 0Clock and cancellation edge cases remain
pthread_cond_timedwait_1-1PASS, exit 0Clock and cancellation edge cases remain
pthread_mutex_trylock_1-1PASS, exit 0Contention/error paths remain
sem_timedwait_1-1PASS, exit 0Semaphore signal/clock edge cases remain
pthread_spin_lock_1-1PASS, exit 0SMP execution remains disabled

The latest LTP runner reports two failures and exits 1. Assertions and expected results were not weakened. MemAvailable and unlinkat cleanup fixes removed earlier harness startup failures, exposing these specific ABI gaps.

QEMU validation does not establish VMware behavior. OOBE guest account setup and keyboard input were exercised by the normal desktop test. VMware remains untested. Remaining ports, all B01-B46 contracts, 159 missing dispatches and the five timer rows pending validation remain in scope. The CSV contains 84 originally routed uncertified calls, 110 newly implemented but not fully certified calls and 17 excluded Linux reserved/ni entries.

Resource checkpoint and default libc migration (2026-09-08)

2026-09-10:静态 musl GCC 正式构建与镜像集成

musl-gcc 组件默认启用,普通桌面 ISO、VMDK、installer 的 live 根及安装负载 均包含 Dyne 2.2.0 原始 GCC 15.1.0、binutils 2.44、C/C++ 编译器、头文件及静态库。 归档 SHA256 与官方发布一致;6058 个上游文件全部保持内容不变,58 个 /bin 静态 ELF 启动器只负责重定位编译器/sysroot 并转交参数。静态链接使用 -static。 此套件独立于 GUI SDK,不更改 GCC 或应用源码,也不改变当前 Linux ABI 状态计数。

为了保留大小写不同的 Linux 头文件,普通 Live ISO 与 installer 内存根改用 classic ext2;旧 root.fat 模块路径与 FAT32 介质仍兼容。真实 ext2 RAM 读写、 statfs 可写标志已同步处理。安装器遍历从每目录最多 64 项改为 musl readdir 动态读取,并保留安装目录权限。相同静态包文件用 ext2 硬链接减少内存根体积; 可变配置和账户数据库不共享 inode。普通 ISO 保留 BIOS El Torito 项,EFI 使用 仓库验证过的 GRUB standalone,避免宿主 grub-mkrescue EFI 在 OVMF 中缺页。

实际验证:

验证边界:本轮未执行完整落盘安装/更新、BIOS 内核启动、VMware 或完整 LTP; C++ 实际执行仅宿主验证,不能据此宣布全部 Linux ABI 或全部 GCC 功能兼容。 此前记录的共享匿名 mmap 首次触页问题、其余 syscall 未完成项仍然有效。