Add machine-checked proofs for critical arithmetic paths
Merged
JS
3mo ago+4712+4712+0123456789012345678901234567890123456789-1222-1222-0123456789012345678901234567890123456789
Summary by cubic
Adds machine-checked proofs across key arithmetic paths (sendmsg cmsg walk, FUSE reply frames, initial stack layout, netlink TLVs, sockaddr reshape, signal frame placement, GVA) and gates them in CI with a mutation test suite. Also tightens process management, path handling, and memory sync behavior.
-
New Features
- Proved headers and targets:
src/core/stack-math.h(verify-stack),src/syscall/cmsg-math.h(verify-cmsg),src/syscall/fuse-math.h(verify-fuse),src/syscall/netlink-math.h(verify-netlink),src/syscall/sigframe-math.h(verify-sigframe),src/syscall/sockaddr-math.h(verify-sockaddr),src/core/gva-math.h(verify-gva). - GVA call-site checks: runtime contract asserts behind
-DELFUSE_CONTRACT_ASSERTplustests/test-gva-contracts.c;make check-contractsbuilds and runs them. - CI: proofs are gating (
make verify) andverify-mutantsruns per target; adds ACSL coverage, plain-char signedness, and mutant-matrix sync checks; trims prover timeout for mutants. - Wire ABI split:
syscall/linux-wire.h(errno/flags/structs/FD table) andsyscall/linux-limits.h(size limits) separated fromsyscall/abi.h(dispatch only).
- Proved headers and targets:
-
Bug Fixes
- Netlink: fixed receive hang from uint32 wrap; TLV walks now proved and use aligned span math.
- Process management: guard host PID reuse by matching
(host_pid, guest_pid)after relock; shrink proc table when fully idle; treathost_reap_pendingas live. - FUSE: clamp negotiated
max_writebymax_pages; switch node-ref lookups to an open-addressed hash. - msync: defer fsync outside
mmap_lockon duped fds; size scratch arrays under lock. - Paths and I/O: add
path_tr_nofollow(); route no-sysroot fast path throughtx.host_path; table-driven/procvirtual dirs; report realread(2)errors during sysroot probing; fix double-negated errno in slab restore. - Fork IPC: close received host fds when a
guest_fdis out of range.