From 8f3e3aae6bd8f5575aec31a66440fe0107d353f3 Mon Sep 17 00:00:00 2001 From: kellito Date: Mon, 27 Jul 2026 09:22:56 +0900 Subject: [PATCH] v5.10: round-9 relibc/base stubs removed (deferred from round 8) Round-9 fix pass for items the round-8 scan flagged as still unfixed. All per local/AGENTS.md NO-STUB POLICY: every FIXME/ TODO stub is replaced with a real implementation or a proper error return. relibc (0fee9dc1) - fix round-8 deferred stubs in linux platform: 1. sigqueue (signal.rs:42,45) - fill si_pid via Self::getpid() and si_uid via Self::getuid(). Receivers can now identify the sender. (Redox path was already correct.) 2. exit_thread (mod.rs:168) - proper thread exit: munmap the stack then call syscall!(EXIT, 0). On Linux this terminates only the calling thread, not the process. Previously called process::exit(0) which killed the whole process. 3. aarch64 rlct_clone (mod.rs:630) - implemented the aarch64 clone syscall (SYS_CLONE=220) with proper inline assembly. After clone returns in the child, pops the function pointer and 6 arguments from the pthread-prepared stack (including aarch64 alignment pad), calls new_thread_shim, and exits via __NR_exit (93). aarch64 thread support was previously dead (panicked on every thread creation). base (7d40dff0) - fix round-8 deferred stubs in initfs, randd, ptyd: 4. initfs bulk write (tools/src/lib.rs:270) - added inode_table: Vec to State. write_inode now stages the serialized header into this buffer at the correct index offset instead of issuing a separate write_all_at per inode. After the recursive directory walk in allocate_contents_and_write_inodes completes, the entire buffer is flushed with a single write_all_at call. 5. randd entropy pool (randd/src/main.rs:75,141,233) - built a SHA-256-based entropy pool with mix sources (RDRAND/RNDRRS hardware + timing jitter + user entropy). PRNG re-seeds every 4096 reads. Removed all 4 TODO comments. 6. ptyd VLNEXT/VDISCARD (pty.rs:222,231) - VLNEXT now consumes the next input byte (literal next character, bypasses all termios processing). VDISCARD now clears the cooked buffer. Real implementations, not silent no-ops. Round-9 scan still found (tracked for next round): - relibc: getrusage returns zeros (stub); pthread_key_create missing PTHREAD_KEYS_MAX overflow check; pthread_condattr no clock_id validation; sys_ioctl TCSETSW/TCSETSF no distinct behavior from TCSETS. - procmgr.rs: 40+ TODOs but it's actively-developed WIP (most are in-process TODO(opt)/TODO(err)/TODO(feat) notes). --- local/sources/base | 2 +- local/sources/relibc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/local/sources/base b/local/sources/base index 4ba511830f..7d40dff006 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit 4ba511830f0d3f6006021fb55cfb021369bd510e +Subproject commit 7d40dff0067ce7ea6a4adfcfda61df015ab083b3 diff --git a/local/sources/relibc b/local/sources/relibc index d9760bdc41..0fee9dc19f 160000 --- a/local/sources/relibc +++ b/local/sources/relibc @@ -1 +1 @@ -Subproject commit d9760bdc41afd7976ac2161c05b1d95ff9a7c3db +Subproject commit 0fee9dc19fd6b714f7580a58158c04a2de85e7f6