XNU as a loadable kernel module inside Linux (macOS personality for arm64 Linux)
C
Commits on main
XNU patch: hosted kext_alloc wires its memory (no XNU page-fault path while hosted yet)
8b7c454 Heyang Zhou committed 8 days ago
vm-xnu-rebuild.sh: keep the kernel's KC slots in step with its size (kc27-layout.py), rebuild the KC
9415dc7 Heyang Zhou committed 8 days ago
xnu.ko: load a fileset kernel collection (kernel symbols from its com.apple.kernel entry; XNU applies the chained fixups); bootstrap window follows the image's vmlow; kbisect IMAGE=
2a0ec4f Heyang Zhou committed 8 days ago
XNU patch: no-op os_log_coprocessor_with_handle/os_metric_coprocessor (27.2 RTBuddy imports them)
2472e48 Heyang Zhou committed 8 days ago
XNU patch: hosted without pthread.kext, pthread_init/pth_proc_hashinit skip instead of panicking
52bbe9c Heyang Zhou committed 8 days ago
XNU patch: ml_wait_max_cpus does not wait for the CPU kext while hosted (thread dump: kernel_bootstrap_thread blocked in kperf_init_early -> ml_wait_max_cpus)
5858716 Heyang Zhou committed 8 days ago
XNU patch: linux64_dump_threads (state, wait event, continuation, saved frames) from the hosted idle path after 20000 rounds
280ccc7 Heyang Zhou committed 8 days ago
XNU patch: stages 8201/8202/8211/8212 around PE_lockdown_iokit and bsd_init; bsd_init progress to kprintf
b5cc269 Heyang Zhou committed 8 days ago
XNU patch: hosted cpu_idle goes to the host first (idle_enable stays FALSE without the CPU kext, so it bounced back to machine_idle ~30M times/s; monitor showed host_idle=0)
7fcb7a6 Heyang Zhou committed 8 days ago
Monitor thread: FKI helper threads (fki_thread_start/stop, fki_msleep); xnu.ko prints XNU's linux64_dbg counters from another CPU every 2 s while XNU runs
0b2330f Heyang Zhou committed 8 days ago
XNU patch: cpu_idle does not bounce back to machine_idle on a proximate timer while hosted (no timer IRQ would ever come: endless idle loop)
05c85f5 Heyang Zhou committed 8 days ago
XNU patch: machine_idle and the WFE path never unmask hardware IRQs while hosted (virtual flag only)
78452f7 Heyang Zhou committed 8 days ago
assert.h: C linkage for the hosted assert hook (C++ callers in libkern)
217b961 Heyang Zhou committed 8 days ago
Hosted XNU assert() reports to the host (stage 997) instead of a brk Linux cannot handle; xnu.ko param assert_fatal
c5db950 Heyang Zhou committed 8 days ago
XNU patch: hosted without platform kexts, IOPanicPlatform starts the generic IOPlatformExpert instead of panicking
5ef0d26 Heyang Zhou committed 8 days ago
XNU patch: arm64_replace_bootstack is a no-op while hosted (it rewrote SP_EL1 and ran on SP_EL0 = Linux current); stages 8101-8103 in machine_lockdown
26f3b6a Heyang Zhou committed 8 days ago
XNU patch: skip the trust cache runtime while hosted without AppleImage4/AMFI (M2e brings them)
068bd3d Heyang Zhou committed 8 days ago
XNU patch: read_random/write_random/random_cpu_init fall back when no PRNG provider is registered (PoC)
6f00c44 Heyang Zhou committed 8 days ago
kbisect: raise console loglevel so the serial console carries XNU output through a hang
6da373b Heyang Zhou committed 8 days ago
kbisect prints the kprintf line count; stream script keeps the run output
3dc483a Heyang Zhou committed 8 days ago
vm-m2-stream.sh: stream dmesg over ssh so logs survive a VM hang
8d23d15 Heyang Zhou committed 8 days ago
XNU patch: PoC random fallback when no corecrypto provider is registered
826dbb6 Heyang Zhou committed 9 days ago
XNU patch: virtual interrupt flag while hosted (no Linux IRQ on XNU stacks); printf vsnprintf decl
10df39a Heyang Zhou committed 9 days ago
XNU printf goes to the host too (os_log/console paths block this early)
bc86ecf Heyang Zhou committed 9 days ago
-noprogress (the progress-bar loop never ends without a display); stages around InitIOKit/ConfigureIOKit
0b90317 Heyang Zhou committed 9 days ago
M2c: cooperative idle — XNU's idle hands its timer deadline to the host, which sleeps in Linux
68bd845 Heyang Zhou committed 9 days ago