mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[PR #32] [MERGED] kernel: finish Xoodyak entropy integration #88
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#88
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/RhapsodiOS/RhapsodiOS/pull/32
Author: @raynorpat
Created: 9/26/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @raynorpat
Base:
master← Head:claude/clever-wozniak-vlavpe📝 Commits (2)
fa3ea2ekernel: finish Xoodyak entropy integration (models B/C, per-open reseed, ioctl, blocking /dev/random)d73e79ckernel: drop the random(4) entropy ioctl📊 Changes
4 files changed (+150 additions, -21 deletions)
View changed files
📝
docs/kernel/CSPRNG.md(+47 -18)📝
src/kernel-7/bsd/dev/random/randomdev.c(+90 -3)📝
src/kernel-7/bsd/dev/random/randomdev.h(+5 -0)📝
src/kernel-7/bsd/kern/kern_clock.c(+8 -0)📄 Description
Summary
random_harvest_jitter(), hooked fromhardclock()(bsd/kern/kern_clock.c), folding interrupt-timing jitter into the CSPRNG (entropy model B). It usessimple_lock_tryrather thansimple_lockso it can never spin against the lock held by process-context device I/O./dev/randomreads block viatsleep()/wakeup()until enough early samples have been folded in;/dev/urandomnever blocks.random_open()now performs a per-open reseed, mixing a freshmicrotime()sample into the state on every open.docs/kernel/CSPRNG.mdto describe the finished entropy model and remove the now-completed "Future hooks" section.An entropy-reporting ioctl was prototyped and then dropped: real XNU's own descendant of this driver never exposed one (
d_ioctlstayseno_ioctl), so this keeps parity with that instead of inventing a bespoke command number.Closes #31.
Test plan
hardclock()hook (simple_lock_try, rate-limited).tsleep/wakeup/PZERO/PCATCH/hzare declared via existing includes.🤖 Generated with Claude Code
https://claude.ai/code/session_014TCvq31jNfaBjMSLEnrqxD
Generated by Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.