RC RANDOM CHAOS

macOS Kernel Loads as Linux Kernel Module

· via Hacker News

Original source

XNU Linux: Full OS X GUI Userspace on Linux

Hacker News →

The xnulinux project runs macOS’s XNU kernel as a loadable kernel module inside a standard Linux kernel, allowing native execution of macOS processes alongside Linux processes without a hypervisor. Linux provides underlying resources—memory, timers, files, network, and GPU access—through a minimal interface layer. This approach boots a full macOS desktop environment with Finder, Safari, and other system components in 31-48 seconds on arm64 Linux VMs running on Apple Silicon hardware.

The implementation uses two kernel modules separated by licensing: xnu.ko (APSL-2.0) contains Apple’s XNU kernel operating in its own address space, while fki.ko (GPL) provides the interface layer for resource management. The system supports GPU acceleration via Vulkan bridge with CPU fallback and runs as a systemd service. While stress testing shows stability, production use faces trade-offs including relaxed security policies (SIP, AMFI patching) and higher memory latency from 4K page constraints. The project demonstrates sophisticated kernel interface design and reveals the feasibility of running full macOS environments on Linux infrastructure.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.