Progress
Legend: ✅ done · 🔨 in progress · ⬜ open
Stage 1: shell inside the kernel
| # | Milestone | Status | Tests |
|---|---|---|---|
| 0 | Setup: toolchain, Limine, git, GitHub | ✅ | – |
| 1 | Limine boot, serial output, framebuffer test pattern, panic handler | ✅ | manual: BIOS + UEFI |
| 2 | Test framework + make test | ✅ | 7 tests: lib, boot, should_panic + manual failing-test check |
| 3 | Framebuffer text console (bitmap font), println! | ✅ | 9 unit tests (font, console) + screenshot |
| 4 | GDT + TSS (double fault stack) | ✅ | 3 tests: CS/TR/GDTR, IST stack |
| 5 | IDT + exception handlers | ✅ | 3 unit tests + integration tests page_fault, stack_overflow |
| 6 | PIC remap + PIT timer | ✅ | 4 tests: ticks, sleep_ms, PIC mask, APIC off |
| 7 | PS/2 keyboard | ✅ | 13 unit tests + E2E via sendkey (QWERTZ, umlauts, AltGr, Caps) |
| 8 | Physical frame allocator from the Limine memory map | ✅ | 9 tests: fake memory maps, real alloc/free, zeroing |
| 9 | Paging: map/unmap, kernel stack with guard page | ✅ | 8 unit tests + real recursion overflow test |
| 10 | Kernel heap → alloc | ✅ | 9 tests: allocator core on a fixed arena + Box/Vec/String/BTreeMap, growth, reuse |
| 11 | Shell | ✅ | 37 unit tests (console, input, parser, line editor, commands) + 19-step E2E over serial |
Stage 2: multitasking, files, user space (decided 2026-10-24)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 12 | APIC: ACPI/MADT, local APIC + timer, I/O APIC, 8259 masked | ✅ | 10 tests + E2E on BIOS and UEFI, timer vs. wall clock checked |
| 13 | Multitasking: kernel threads, context switch, scheduler | ✅ | 7 scheduler tests + shell tests + E2E (ps, demo), 3× stable |
| 14 | Storage: PCI enumeration, AHCI SATA driver, block device layer | ✅ | 11 tests + E2E (lspci, disk, hexdump) |
| 15 | FAT32 file system (read/write, long names), persistent across reboots | ✅ | 30 tests + fsck.fat/mtools check of all test disks + 45-step E2E incl. reboot (BIOS + UEFI) |
| 16 | User space: ring 3, syscalls, ELF loader | ✅ | 26 new unit tests (hand-assembled programs) + integration test userspace (real programs from disk) + 7 E2E steps |
Stage 3: a real user space (decided 2026-10-24)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 17 | Files for programs: fd table, open/close/readdir/stat/getcwd/unlink/mkdir, cat/ls/cp as programs | ✅ | read_at unit test, fstest (25 syscall checks incl. errors), integration test, mtools check of a cp copy, 6 E2E steps |
| 18 | User heap: brk-style syscall + allocator in ulib (alloc in programs) | ✅ | 4 unit tests (grow/shrink, limits, release, rollback), heaptest (11 checks), sort in integration test, 6 E2E steps |
| 19 | Processes from processes: spawn/wait/kill syscalls, Ctrl+C | ✅ | Ctrl+C unit tests (foreground, ignore, raw scancode tracker), spawntest (17 checks incl. orphans), 6 E2E steps (Ctrl+C over serial), PS/2 Ctrl+C checked via sendkey |
| 20 | Shell as a user program (/bin/sh started as init, kernel shell as fallback) | ✅ | builtins_for_user_space, scripted /bin/sh session in the integration test (injected serial input), whole E2E suite (72 steps) now against /bin/sh + exit fallback |
Stage 4: a usable system (decided 2026-10-24)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 21 | Pipes and redirection (a | b, >, >>, <) | ✅ | 4 pipe unit tests (EOF, EPIPE, full pipe with a writer thread, abort), pipetest (17 checks incl. 200 KB from a child), scripted sh pipeline session, 8 E2E steps |
| 22 | System information as syscalls (replace kshell), ps/mem/... as programs, rename + seek | ✅ | write_at unit test, fstest +17 checks (seek, gaps, APPEND, rename, ESPIPE), integration test for all 10 programs, 5 E2E steps |
| 23 | Full-screen text editor as a user program | ✅ | edit --selftest (19 buffer checks), console SGR 7 test, 3 scripted editor sessions in the integration test, 5 E2E steps, screenshot |
Stage 5: hardware (decided 2026-10-24)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 24 | FPU/SSE state per thread; user programs built with SSE2 hardware floating point | ✅ | 3 FPU unit tests (CR0/CR4, initial state, save/restore), fputest (4 preempted workers checking XMM0–15 + MXCSR, pi with f64) in integration + E2E; verified that it fails without the switch |
| 25 | SMP part 1: start the other cores ourselves (trampoline, INIT/SIPI), per-CPU GDT/TSS/LAPIC, jobs on APs | ✅ | 4 SMP unit tests (all MADT CPUs online, jobs run on the right CPU with its own TSS, FPU + heap on APs, trampoline page), E2E cpu shows 4 CPUs, BIOS + UEFI, 3 stable runs |
| 26 | SMP part 2: scheduler on all cores (per-CPU current/idle thread, lock held across switches, no lost wake-ups, swapgs in the syscall stub) | ✅ | new test: spinning threads seen on ≥ 2 CPUs; whole suite green with KERNEL_SMP=1, 2 and 4; demo 4: 760 ms on 1 core → 200 ms on 4 |
| 27 | Network: e1000 driver, Ethernet/ARP/IPv4/ICMP/UDP, ping, netinfo, udpecho | ✅ | 4 packet unit tests (checksum, IPv4/ARP/ICMP/UDP round trips), 4 network tests (config, ARP + ping to the gateway, UDP ports, receive path), integration test (ping/netinfo/unreachable), E2E: ping + UDP echo through a host server |
Stage 6: a complete small system (decided 2026-10-24: "all of it")
| # | Milestone | Status | Tests |
|---|---|---|---|
| 28 | Microsecond clock from the TSC, time program, ping in µs | ✅ | 2 TSC unit tests (calibration, agreement with the tick clock), time hello in integration test + E2E |
| 29 | TCP: connect/listen/accept, retransmission, flow control; client and server programs | ✅ | TCP packet test, refused + 100 KB loopback echo in the kernel, nc/echod between processes, E2E: host echo, 100 KB from the host, host → guest 50 KB via hostfwd |
| 30 | DHCP and a DNS client; HTTP client (wget) and server (httpd) | ✅ | DHCP packet test, card_is_configured checks the DHCP lease, host --selftest (7 DNS checks), httpd + wget over loopback (200/404), E2E: fake DNS on the host, wget from a host HTTP server, the host fetches from httpd via hostfwd |
| 31 | Shell: scripts, environment variables, 2>, background jobs (&, jobs, wait) | ✅ | scripted sh session (expansion, inheritance, $?, 2>, job + wait, #! script) and a set -e script in the integration test, 8 E2E steps |
| 32 | Storage speed: sector cache for FAT32, AHCI completion interrupts (MSI) | ✅ | BlockCache unit test (hits, runs, write-through, eviction), lookup-cache invalidation test, MSI test (≥ 1 interrupt per command), benchmark line in the integration test; suite green with 1 and 4 CPUs |
| 33 | Memory: reclaim bootloader memory, demand paging for user heaps | ✅ | tests/reclaim.rs (≥ 1 MiB gained, former bootloader frames are handed out and survive being overwritten, threads + a program afterwards), demand-paging unit test (32 MiB heap, 3 touched pages, < 100 frames), existing brk/heaptest checks; suite green with 1 and 4 CPUs |
Stage 7: a more Unix-like system (decided 2026-10-25: "all of it")
| # | Milestone | Status | Tests |
|---|---|---|---|
| 34 | Signals: handlers in user space, kill -SIG, Ctrl+C as SIGINT, interrupted blocking calls | ✅ | 2 signal unit tests (dispositions, pending order, blocking during a handler, reasons ↔ numbers), sigtest (23 checks incl. all GPRs + XMM0–15 kept when a handler interrupts a loop without syscalls, EINTR from sleep, no nesting, SIG_IGN inherited), sh kill session, E2E: Ctrl+C caught by a handler, kill -USR1 %1 |
| 35 | Shell programming: if/while/until/for, functions, &&/||, ;, test, $((...)), read, wildcards, multi-line input, Ctrl+C stops loops | ✅ | /m35.sh in the integration test (39 output lines compared exactly: all constructs, break/continue n, functions + recursion, read from pipes and files, globbing, set -e), interactive session (continuation prompt, syntax error, exit in a function), stack growth unit test, 6 E2E steps incl. Ctrl+C ending a loop |
| 36 | Threads in user processes (spawn/join, futex-style wait/wake) and a sleeping mutex in the kernel | ✅ | 2 sync::Mutex unit tests (exclusion, a waiter blocks on Wait::Lock), threadtest (17 checks: shared counter, join codes, futex mutex + heap from 4 threads, futex EAGAIN/timeout/wake, ESRCH, exit / fault / main return / SIGTERM with running threads), no threads left over in the integration test, E2E; suite green with 1–4 CPUs |
| 37 | CPU protection and AVX: SMEP/SMAP, XSAVE with AVX state per thread | ✅ | tests/smap.rs (user_access works, kernel read and kernel jump into a user page fault), CR4/XCR0 unit tests, YMM save/restore unit test, fputest with YMM0–15 in 4 preempted workers, sigtest YMM kept across a handler, E2E cpu shows SMEP/SMAP/AVX on; suite also green with KERNEL_CPU=qemu64 and 1 CPU |
| 38 | Network polish: e1000 interrupts, TCP window scaling, DHCP lease renewal | ✅ | interrupt test (GSI found, median ping < 3 ms – about 0.5 ms now), 1 MB loopback transfer with a scaled window > 64 KiB, WS option round trip, lease phase/retry unit test, renew + rebind against QEMU's DHCP server, renewal message test; suite green with 1, 2, 4 CPUs and qemu64 |
Stage 8: release 1.0 – reliable and understandable (proposed 2026-10-26, see docs/GOALS.md)
No new kernel features: this stage makes the existing system meet the release criteria in docs/GOALS.md.
| # | Milestone | Status | Tests |
|---|---|---|---|
| 39 | Front door: README.md with screenshot and host packages, docs/GOALS.md, OVMF path found on Fedora and Debian/Ubuntu | ✅ | make check green on Ubuntu 24.04 with the detected OVMF path |
| 40 | Reproducible setup: toolchain pinned (rust-toolchain.toml, nightly-2026-10-26), make deps checks host tools and prints the dnf/apt command, make check runs it first; LICENSE (ECPL v1.2) | ✅ | check-deps.sh --selftest (hidden tool reported, exit 1) in make check; manual run with a reduced PATH; make check green with the pinned toolchain on Ubuntu 24.04 |
| 40b | Optional CI (GitHub Actions running make check under TCG) – only if I want it | ⬜ | a green run on a push |
| 41 | Reliability gate: /bin/syscheck (bad pointers/lengths/fds/numbers for every syscall, 20 000 seeded random calls, race mode), make soak (rootfs/soak.sh via scripts/soak.py), make stress (suite N× with 1/2/4 CPUs, qemu64, UEFI, then soak); TLB shootdown by IPI | ✅ | syscheck + syscheck race in integration test, syscheck E2E step, shootdown unit test (old code: hangs), soak negative check (an injected failure is reported); bugs #11–#15 found and fixed |
| 42 | Known limits: "Open items" sorted into documented limitations (no open release blocker); found and fixed on the way: #16 (one write grew the kernel heap by its whole buffer) | ✅ | syscheck: 16 MiB into a pipe without reader → EPIPE with < 1 MiB heap growth (old kernel: +16 388 KiB), oversized sendto → EMSGSIZE |
| 43 | Walkthroughs (docs/walkthrough/): boot to /bin/sh, a key press, cat | wc, a page fault – with links to the functions | ✅ | scripts/check-doc-refs.py (make docs-check, part of make check, with self-test): every [symbol](file) link must name a symbol in an existing file; "things to try" checked in the running system |
| 44 | Experiments (docs/EXPERIMENTS.md): more cores, no FPU save, the bug #14 fix undone, a 16-byte pipe – no build switches, each a small hand edit | ✅ | each experiment run once, results recorded (590 → 250 ms; 4 workers corrupted; panic 2/2; 1.40 → 5.41 s) |
| 45 | Extending guides (docs/HACKING.md): syscall, user program, test, shell built-in | ✅ | the syscall + program guide followed once: syscall 52 uname + /bin/uname (integration test, E2E step, syscheck bad pointers, SYSCALL_COUNT) |
| 46 | Pre-release 0.8.0: GPL-3.0-or-later (LICENSE = FSF text, SHA-256 3972dc97…), version in both manifests and the boot banner, CHANGELOG.md, new screenshot | ✅ | make check green; uname shows YAK 0.8.0 x86_64 |
Decided 2026-10-26: name KernelTry, renamed the same evening to YAK – Yet Another Kernel (my decision); license first ECPL v1.2, then (same day) GNU GPL v3 or later (copyright
FreakySneaky787 and contributors); 1.0 is preceded by the pre-release 0.8.0 (my decision, first prepared as 1.0.0-rc.1).
Still open: N for make stress (proposal: 5), whether CI is wanted (M40b), whether experiments may add build switches to the kernel (M44).
Stage 9: CI and release 1.0 (roadmap phase A, agreed 2026-10-26)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 47 | CI: .github/workflows/check.yml runs make check on ubuntu-24.04 and in a fedora:latest container (QEMU TCG, pinned toolchain, 120 s per test kernel, build/ uploaded on failure); CI badge in the README | ✅ | first run red on both (bug #17: shootdown test limit too strict for CI runners), then green on both: all kernel tests, all test disks fsck-clean, 127/127 E2E steps BIOS + UEFI |
| 48 | Release 1.0.0: version in both manifests, CHANGELOG.md section 1.0.0, release checklist docs/RELEASING.md followed; I decided not to wait for the outside reader (stays open) | ✅ | make check, make course, make book, make release (yak-1.0.0.* booted BIOS + UEFI), make stress; uname shows YAK 1.0.0 x86_64 |
Stage 10: course infrastructure (roadmap phase B)
| # | Milestone | Status | Tests |
|---|---|---|---|
| 49 | Website: mdBook over docs/ (book.toml, docs/SUMMARY.md, home page docs/index.md), make book via scripts/build-book.py (links to files outside docs/ point at GitHub; build fails on broken links), CI builds it, .github/workflows/pages.yml deploys main to GitHub Pages | ✅ | build-book.py --selftest; 17 pages, 0 broken links; rendered pages checked in a headless browser; CI step "Website builds without broken links" |
| 50 | Chapter infrastructure: chapters are folders course/NN-slug/ in main (my decision of 2026-10-26, instead of branches), pages docs/course/, scripts/check-course.py (folder/page pairs, numbering, toolchain copy, every file= code block must match the folder; --build runs each chapter's make test), make course, CI job course, authoring rules in docs/HACKING.md | ✅ | check-course.py --selftest; static check in make docs-check; make course green |
| C1 | Pilot chapter 1 – Booting with Limine (serial output) | ✅ | make test: serial output matches expected.txt; fails when the greeting is removed |
| C2 | Pilot chapter 2 – Testing without an operating system (custom test framework, isa-debug-exit, cargo runner) | ✅ | 3 in-kernel tests; a broken assertion makes make test fail with QEMU status 35 |
| C3 | Pilot chapter 3 – Text on the screen (PSF2 font, framebuffer console, println!) | ✅ | 12 in-kernel tests incl. drawing into an in-memory screen with stride ≠ width; screenshot on the page |
| C4 | Pilot chapter 4 – GDT and TSS (own GDT, TSS with an IST stack for double faults, far return to reload CS) | ✅ | 4 new in-kernel tests (segments, GDTR, TSS descriptor bits, IST1); without gdt::init() the GDTR test fails |
Then: phase C (pilot chapters 1–4 + feedback), phases D/E – see docs/ROADMAP.md.
Stage 11: follow-up of an outside review (agreed 2026-10-27)
An outside review of the docs listed risks and one contradiction; I chose what to do before 1.0: fix the docs, verify UDP checksums, guard pages for thread stacks, tests with a failing disk. Everything else it named stays a documented limitation.
| # | Milestone | Status | Tests |
|---|---|---|---|
| 51 | Docs: "File system" in docs/DESIGN.md contradicted the block cache (bug #20), the power-off guarantee is stated precisely, GOALS says YAK is not the base of a desktop OS; UDP checksums are verified on receipt (0 = none, accepted) | ✅ | packet::tests::udp_checksums_are_verified_on_receipt (wrong IP address, flipped bit, zero checksum, Ethernet padding); E2E UDP echo, DHCP and DNS still work |
| 52 | Guard pages for thread stacks: 64 kernel stack slots [64 KiB guard][256 KiB stack] below the main stack, thread_spawn with stack 0, slots freed after the thread ended; USER_IMAGE_END lowered so the heap cannot reach the stacks (bug #21) | ✅ | thread_stack_slots_have_guards (layout, guards, bug #21); fault thread-stack killed with "stack overflow in a thread" in the page below slot 0; threadtest: 200 KiB on a thread stack, 100 threads in a row, 70 unjoined threads then one more; make test with 1, 2 and 4 CPUs |
| 53 | Disk fault tests: FaultyDisk fails I/O number n (transient, or power loss with a torn write); a volume checker (lost clusters, cross-links, broken chains, chain vs. size, FAT copies); results written down in docs/DESIGN.md "File system" | ✅ | fault_tests::every_failing_io_is_reported_and_leaves_a_mountable_volume (7 operations × every I/O × 2 failure kinds: error reported, volume mounts, untouched files intact, target old or new, only fsck-repairable damage), the_volume_stays_usable_after_a_failed_operation, the_checker_sees_damage |
Stage 12: what 1.0 still needs (decided 2026-10-27)
An outside recommendation for 1.0, checked against the repository: most of it exists. I decided to add the gaps it names before 1.0 – the supported environment written down, the missing shell constructs, long input lines, network fault tests and a downloadable release. 1.0.0 itself still waits for the outside reader (M48).
| # | Milestone | Status | Tests |
|---|---|---|---|
| 54 | Supported environment: README section (QEMU q35/TCG, BIOS + UEFI, 1–4 cores, max/qemu64, devices, hosts), measured RAM limits, KERNEL_MEM in run-qemu.sh | ✅ | make e2e 127/127 at 24, 32, 48, 64, 96, 128 MiB, fails at 16 MiB; make e2e-uefi 127/127 at 160 MiB, fails at 64/96/128 MiB (bootloader out of memory under OVMF – the CPU never leaves firmware code, -d int log) |
| 55 | Shell: $(...) (runs in the shell with subshell semantics, a thread drains the pipe) and "$@"/"$*"/$@; an assignment that does not fit the environment is an error instead of silently lost | ✅ | /m55.sh in the userspace integration test (fields, nesting, quotes inside, multi-line output, restored state, exit + $?, "$@" with spaces and without arguments, 1000 lines ≈ 81 KB through one substitution, too long a value); E2E step at the prompt |
| 56 | Shell: case … in … ;; esac (alternatives, wildcards, quoted patterns literal) and local (dynamic scope, restored on return) | ✅ | /m56.sh in the userspace integration test (8 subjects incl. empty, (pattern) form, no match → status 0, nested functions, local without value, outside a function → error); E2E step case $(uname) in … |
| 57 | Line editor: lines up to 4096 characters over several rows (row/column per position, ESC[nA/B/C across rows, pending-wrap safe), console understands ESC[nA/B/C/D | ✅ | 4 new editor tests on two simulated terminals (wrap, edit across rows, shorter line clears rows, Enter below a long line) – fail without the pending-wrap step; console::tests::ansi_cursor_moves; E2E: a 185-character line edited at its start; screenshot checked |
| 58 | Network fault tests: loss injection on the loopback path (net::set_loopback_loss), TCP retry limit settable, retransmission counter; misbehaving fake name server in the E2E test | ✅ | kernel/tests/netfault.rs: 3 echoes of 8 KB with every 10th packet lost (5–14 retransmission timeouts, 2.7–6.1 s under full CPU load, data intact; first version with 20 KB / every 5th packet: bug #22), connect into silence → TimedOut after 1.5 s, silent peer → TimedOut after 3.0 s with 3 retries; E2E: NXDOMAIN, SERVFAIL, CNAME only, stray + truncated replies, silence (4.5 s, "timed out"); host --selftest +4 malformed-answer checks. No bug found |
| 59 | Release files: make release (scripts/release.sh) builds yak-<version>.iso (scripts/mkiso.sh, shared with run-qemu.sh), the disk image with /bin (gzip), run-yak.sh and SHA256SUMS and boots them once (scripts/check-release.py); .github/workflows/release.yml attaches them to a published GitHub release; README "Try it without building"; checklist docs/RELEASING.md | ✅ | make release: BIOS and UEFI boot of the files with run-yak.sh (shell, uname = version, /bin ≥ 30 programs, $(...), poweroff); negative check: a disk without /bin fails; make check green after moving the ISO build into mkiso.sh |
Stage 13: the course after 1.0 (roadmap phases C and D, decided 2026-10-29)
I decided to prepare the pilot for its first outside reader – so that a report can arrive in a usable form – and to continue with chapter 5 meanwhile instead of waiting.
| # | Milestone | Status | Tests |
|---|---|---|---|
| 60 | First-reader pass over chapters 1–4: every folder built on its own outside the repository (own Limine clone); the pages compared line by line with the folders – chapters 3 and 4 never showed how the new code is wired into kmain, chapter 3 counted one test twice, chapter 1 claimed a reset loop that -no-reboot prevents; QEMU's "terminating on signal 15" moved into build/qemu.log; a "What changed" diff line per page; issue forms "I got stuck in a course chapter" / "Feedback on the course"; CONTRIBUTING.md | ✅ | make test in copies of all four folders without LIMINE_DIR; check-course.py also checks the course table, the issue form's chapter list and the diff line (--selftest with all three failures) |
| C5 | Chapter 5 – Interrupts and exceptions: own IDT (idt.rs, 16-byte gates, lidt), x86-interrupt handlers for vectors 0, 3, 6, 8, 13, 14 (interrupts.rs), double fault on IST1, faults on purpose via the kernel command line (fault=page, fault=stack; run-qemu.sh gets KERNEL_CMDLINE/EXPECTED and notices when QEMU ends by itself) | ✅ | 22 in-kernel tests (6 new: gate bits, IDTR, breakpoints return, IST1 gate, exactly six gates present, page fault error text); 3 boot checks – normal, page fault at 0xdeadbeef, double fault on its own stack; without .set_ist(…) the double fault check fails in 1 s (triple fault), without interrupts::init() the IDTR test fails |
| C6 | Chapter 6 – Hardware interrupts and the timer: port.rs shared by serial/PIC/PIT, 8259 PIC moved to vectors 32–47 with EOI and spurious IRQ 7/15 handling, a CPU without local APIC in run-qemu.sh (-cpu qemu64,-apic: Limine masks LINT0, and switching the APIC off is not enough under QEMU 8.2 – bug #25), PIT at 100 Hz, time.rs (ticks, uptime_ms, sleep_ms in hlt, deadline rounded up + 1 as after bug #18) | ✅ | 29 in-kernel tests (7 new: no APIC (CPUID), masks, vectors, divisor, ticks in hlt, deadline rounding, sleep lower bound); normal boot needs sleep_ms(1000) ≥ 1000 ms (measured 1010); green under QEMU 8.2.2 (Ubuntu 24.04, container) and 10.2. Counter-checks: with an APIC the kernel hangs after sti; without EOI exactly one tick; without the PIC remap IRQ 0 hits the double fault handler with a frame one place off; without the timer gate #GP 0x102 |
| C7 | Chapter 7 – The keyboard (end of part I): ringbuf.rs (fixed-size byte ring buffer), scancode.rs (set 1 decoder, US layout as one table row per keyboard row, Shift, Caps Lock, E0/E1 prefixes skipped), keyboard.rs (IRQ 1 handler stores the byte, controller drained before unmasking, read_key with the lock taken only under cli and sti; hlt against the lost wake-up), echo loop in kmain, \x08 in the console; run-qemu.sh types with QEMU sendkey through a monitor FIFO (KEYS, KEYS_AFTER) | ✅ | 36 in-kernel tests (7 new: ring buffer, four decoder tests, buffer → read_key, backspace on the console); the normal boot check types "Hi YAK!" with Shift and Caps Lock and waits for the echo; green under QEMU 8.2.2 (container) and 10.2. Counter-checks: without the inb or without the EOI only the first key arrives; with the lock held across hlt everything stops at the first key; without the prefix rule prefixed_keys_are_skipped fails |
| C8 | Chapter 8 – Physical memory (start of part II): HHDM and memory map requests, mem.rs (PhysAddr whose only way to a pointer is the HHDM, alignment helpers), pmm.rs (bitmap frame allocator over the usable ranges only – Limine's reclaimable memory holds the live page tables, the stack and the responses; the bitmap lives in the first usable range that fits and reserves itself; next_word search, free refuses nonsense), kmain prints the memory map and round-trips a frame | ✅ | 45 in-kernel tests (9 new: helpers, four on a fake 256-frame machine, usable amount, every frame taken and chained through memory – each in usable RAM, none the bitmap – and freed again, zeroed frame). Counter-checks: without reserve the first frame is the bitmap and free_frame panics with NotAllocated; a physical address as pointer page-faults at 0x62000; bootloader memory counted as usable boots fine but the every-frame test page-faults in the HHDM |
| C9 | Chapter 9 – Paging: paging.rs (entries and tables through the HHDM, translate with huge pages, flags, map creating zeroed intermediate tables, unmap with invlpg), stack.rs (stacks in PML4 slot 510 with an unmapped guard page), fault=overflow – a real recursion on a guarded stack that ends in the double fault handler; executable address request. Found bug #26 (PAT bit of huge pages shifted translate by 4 KiB), fixed in the kernel too | ✅ | 52 in-kernel tests (7 new: indices, kernel address against Limine's, HHDM and empty lower half, map/unmap round trip costing exactly three tables, framebuffer translation (bug #26), no 4 KiB page inside a huge one, guard page unmapped); a fourth boot check for the overflow; green under QEMU 8.2.2 and 10.2. Counter-checks: guard page mapped – the overflow runs one page past the stack; without invlpg the unmapped page still reads 0xbeef; intermediate tables without WRITABLE – protection violation on write |
| C10 | Chapter 10 – The heap (end of part II): heap.rs – a free list sorted by address whose 16-byte headers live in the gaps, blocks rounded to 16, first fit with alignment padding given back, merging with both neighbours on free; #[global_allocator] behind a spin lock, an empty area in PML4 slot 507 that maps at least 64 KiB more with paging::map when a request does not fit, 16 MiB limit; extern crate alloc with Box/Vec/String/format! in kmain; fault=heap – a Vec over the limit ends in Rust's memory allocation of … bytes failed panic | ✅ | 61 in-kernel tests (9 new: four on a free list over a 16 KiB array – merging, alignment, full list, first fit; five on the kernel heap – Box/String/format in the heap area, growth, 10 000 boxes leave it unchanged, BTreeMap, over the limit is null without mapping); a fifth boot check for fault=heap; green under QEMU 8.2.2 and 10.2. Counter-checks: no merge with the following gap – 3 gaps instead of 1; alignment ignored – a 4096-aligned block 16 bytes off; sizes not rounded to 16 – misaligned pointer dereference; area not mapped – page fault at 0xfffffd8000000000 |
| C11 | Chapter 11 – A first shell (part III): words.rs (a line split into words in one pass, "…"/'…' keep spaces, empty words, UnclosedQuote), shell.rs (LineEditor – characters, Backspace that never eats the prompt, Enter, 72-character limit; a static table of six commands help, echo, clear, uptime, sleep, mem behind execute; every piece writes to a core::fmt::Write); kmain ends in shell::run() instead of chapter 7's echo loop | ✅ | 71 in-kernel tests (10 new: three on the splitter, two on the line editor, five on commands through execute into a String); the boot check types echo Hi YAK!, a Backspace-corrected echo shell, nope and mem with sendkey; green under QEMU 8.2.2 and 10.2. Counter-checks: Backspace without the guard eats the prompt (screenshot: yak), every space ending a word gives empty words, no line limit – 77 characters |
| C12 | Chapter 12 – ACPI and the APIC (part IV): acpi.rs (RSDP → RSDT/XSDT with checksums → MADT: CPUs, local and I/O APIC addresses, ISA overrides; parser over a byte slice), paging::map_device with a NO_CACHE flag for device registers at their HHDM address, lapic.rs (software enable, EOI, timer measured over 10 PIT ticks, then periodic on vector 32), ioapic.rs (SELECT/WINDOW, redirection entries, all masked, route/mask), PIC only remapped and masked; interrupts::start after memory; QEMU with -cpu qemu64 again. Found bug #27 (PIT mode 3 through the I/O APIC = 200 Hz), fixed with mode 2 | ✅ | 82 in-kernel tests (12 new: checksum, hand-made MADT, MADT without I/O APIC, QEMU's tables; local APIC present, mapped uncached, enabled, ID, timer periodic, timer ≈ 625 000 counts per tick (bug #27); 24 inputs, only the keyboard routed; two PIC tests became every_line_is_masked); boot checks unchanged; green under QEMU 8.2.2 and 10.2. Counter-checks: no EOI, override ignored, APIC not enabled – all hang after the heap lines; PIT not masked – sleep 5000 takes 2.7 s on the host clock |
| C13 | Chapter 13 – Threads and a scheduler: task.rs (threads in a BTreeMap of boxes, guarded 32 KiB stacks, switch_context in global_asm! saving rbx/rbp/r12–r15, a hand-made first stack returning into a trampoline, round-robin queue, idle thread, kmain as thread 0; preemption from the timer handler after the EOI; wait_for(wait, ready) checks and blocks with interrupts off – used by sleep_ms, read_key and join; reap frees dead threads' stacks in spawn/join, never in the interrupt), stack::free, without_interrupts, a heap whose lock is taken with interrupts off (the timer handler allocates now), shell command threads | ✅ | 91 in-kernel tests (9 new: first stack word by word, spawn/join/reap, yield turns, preemption of a loop without yield, a sleeper blocked until its tick, 160 stack frames returned, the timer allocating while a thread holds the heap, only main and idle left, threads in the shell); the boot check types threads; 7 runs under QEMU 10.2 and 3 under 8.2.2 green; sleep 5000 5.2 s on the host clock. Counter-checks: EOI after on_tick and no sti in new threads – boot stops after the first thread line; heap lock with interrupts on – 6 runs green without the new test, 3 of 3 hang with it |
| C14 | Chapter 14 – The other CPUs: smp.rs (a frame below 1 MiB reserved right after mem::init, the real → protected → long mode trampoline with hand-encoded loads, copied and filled in, identity-mapped for the start with Flags::CODE; INIT, 10 ms, STARTUP, second STARTUP; ap_main with its own GDT/TSS/double fault stack, shared IDT, local APIC on; a mailbox per CPU, run_on, wake-up IPI on vector 0xF0), IPIs in lapic.rs, gdt::init_other_cpu, the MADT's APIC ID list, QEMU with -smp ${KERNEL_SMP:-4}; the scheduler stays on the BSP. Found bug #28 in chapter 13 | ✅ | 96 in-kernel tests (4 new: all MADT CPUs online, a job runs on its CPU with its own TSS and GDT, the heap on every CPU, trampoline below 1 MiB and unmapped again); green with KERNEL_SMP=1/2/4 under QEMU 10.2 and 8.2.2; 30 boots without a hang. Counter-checks: no identity mapping – #PF on the instruction fetch after paging on, triple fault; the BSP's GDT on an AP – #GP 0x18 on ltr, triple fault; AP's APIC off – run_on waits for ever |
| C15 | Chapter 15 – One scheduler for all CPUs: task.rs with per-CPU current/idle, on_cpu per thread, the scheduler lock held through switch_context and released by the next thread (finish_switch, SCHEDULER_DATA + force_unlock), wait_for announces the block before it checks, wake_one cancels the block of a thread still on a CPU, kick_idle_cpu IPIs; a timer per CPU (only the BSP counts time), the APs' start code becomes their idle thread (join_cpu), run_on jobs run in the wake-up interrupt handler; gdt::on_double_fault_stack per CPU; joiners woken once the dead thread is off its CPU (bug #30); timer calibration window of chapters 12–15 widened (bug #29). Ends part IV | ✅ | 100 in-kernel tests (new: idle thread per CPU, a timer per CPU, threads on every CPU, 2000-round ping-pong across CPUs, lock free after switches); make test 3× in a row, unit tests with KERNEL_SMP=1/2/4. unit tests 6× more, 4 of them with the host fully loaded. Counter-checks (3× each): "check, then block" – ping-pong hangs; lock released before the switch – hangs |
| C16 | Chapter 16 – PCI and a SATA disk: pci.rs (configuration space through ports 0xCF8/0xCFC behind a lock – two CPUs must not interleave address and data –, brute-force enumerate, find, memory_bar, enable_dma), block.rs (BlockDevice, check_request), ahci.rs (controller in AHCI mode, ports by SATA status and signature, command list + received FIS + command table in one frame, IDENTIFY, READ DMA EXT through a 4 KiB bounce buffer, polling with a 1 s timeout, init once only), outl/inl; mkdisk.py makes a 1 MiB test disk whose sectors name themselves; shell commands disk and read <sector> (hex dump). Starts part V | ✅ | 111 in-kernel tests (new: host bridge and SATA controller found, empty slots, DMA on, IDENTIFY, first and last sector, 20-sector read over three commands, bad requests, init once, hex dump); make test types disk and read 5. Counter-check: bus mastering cleared → IDENTIFY times out; left out of enable_dma → no change, the firmware had set it (command register 0x107) |
| C17 | Chapter 17 – Reading FAT32: fat32.rs (FatFs<D: BlockDevice>: mount checks the BPB against itself and the disk; FAT entries with the 28-bit mask; chain refuses chains that leave the volume or run in a circle; directory entries with NT lower-case flags and VFAT long names with checksum; case-insensitive lookup, read_dir, read_file), fs.rs (SystemDisk locks ahci::DISK per access, fs::FS, mount); test disk by mkdisk.sh (mkfs.fat + mtools, 64 MiB, long names, a 196-cluster file, a directory over several clusters); shell ls, cat; CI course job installs dosfstools + mtools | ✅ | 122 in-kernel tests (new: BPB, names short/long/lower case, case-insensitive lookup, LFN checksum = mtools', files three levels deep and empty, 100 000-byte file checked byte by byte, 40-entry directory over several clusters, path errors; a zeroed boot sector and a FAT loop injected through a sector overlay give NotFat32 and Corrupt, not a hang); make test types ls and cat docs/notes.txt |
| C18 | Chapter 18 – Writing FAT32: AHCI WRITE DMA EXT (header bit W) and FLUSH CACHE EXT, BlockDevice::write/flush; fat32.rs: free clusters counted at mount (FSInfo only written), set in every FAT copy, allocate (refuses before writing, chain complete before it is hung on), free_chain, entries remember their slots and 8.3 name, free_slot grows a full directory, 8.3 names with case flags only (BadName otherwise, the alias of a long name is taken), write_file/append/create_dir/remove in a crash-tolerant order, sync = FSInfo + flush; shell write, append, mkdir, rm; check-disk.sh runs fsck.fat -n and mtools on the image after QEMU | ✅ | 132 in-kernel tests (new: write/read back, replace frees clusters, append over a cluster boundary, directories growing, removal incl. long-name pieces, name/path errors, full volume refused, free count exact); fsck.fat clean and mtools byte-exact after the unit tests and after the boot check. Counter-checks (once each, all caught by fsck.fat): one FAT copy only – "FATs differ"; long name pieces left – "Orphaned long file name part"; tests with their own mounts – "Free cluster summary wrong" |
| C19 | Chapter 19 – A block cache, and the disk's interrupt: BlockCache<D> (write-through, runs of misses as one read, least-recently-used replacement, hit/miss counters) under the file system (fs::Disk, 2048 sectors); PCI capability list + enable_msi; AHCI: GHC.IE, PxIE, handle_interrupt (errors kept in FAILED_PORTS, task::wake(Wait::Event(0x50))), commands wait in task::wait_for (polling without MSI or with interrupts off); boot counts disk commands for /big.bin: 394 without the cache, 196 through it, 0 the second time; shell disk shows commands, interrupts, cache. Ends part V | ✅ | 137 in-kernel tests (new: cache reads once / runs, write-through, LRU order, MSI capability, commands end by interrupt; the IDT test caught the new vector); fsck.fat + mtools still clean on top of the cache. Counter-check: no task::wake in the handler – the test kernel hangs at IDENTIFY (2 of 2 runs) |
| C20 | Chapter 20 – Ring 3 and the first system call: user data/code descriptors (DPL 3, selectors 0x2B/0x33); a TSS per CPU in an UnsafeCell, RSP0 set by the scheduler at every switch to a thread's own kernel stack (gdt::set_kernel_stack); USER bit propagated to every table level in paging::map; user.rs: code/data/stack pages at 0x40_0000/0x40_1000/below 0x80_0000 (mapped once – no TLB shootdowns), iretq into ring 3 with cleared registers, int 0x80 through a DPL 3 gate and an assembly entry (write with address checks: lower half, every page USER; exit; −14/−38 like Linux), faults with CS in ring 3 end the program (#GP, #PF, #UD, #DE); int 0x80 instead of syscall (no stack switch to build) – my choice for the chapter, syscall is what the reference kernel uses. Starts part VI; the last chapter for now | ✅ | 145 in-kernel tests (new: user segments DPL 3, hello + exit 42, stack, cli → #GP, kernel read and own code write → #PF, bad pointer → −14, unknown call → −38, user_bytes edges, timer preempts ring 3 (also with KERNEL_SMP=1), RSP0 = running thread's stack). Counter-checks (once each): gate without DPL 3 – every int 0x80 is a #GP; USER only on the page – #PF at the first instruction; no RSP0 – double fault (push to −8) |
| M61 | YAK 1.1.0 – the course release: version 1.1.0 in both manifests, CHANGELOG section 1.1.0 (chapters 1–20; the kernel is 1.0.0's with two test fixes), README/GOALS/ROADMAP status; I create the tag v1.1.0 and the GitHub release | ✅ | make check green (E2E: uname → "YAK 1.1.0 x86_64"); make stress green (5 passes with 1/2/4 CPUs, qemu64, UEFI, soak 10 rounds, 0 failures; 40 min); make course 20/20 – after bug #31, which the first run found (a GDT test in chapters 15–20 asked whichever CPU the test thread was on); make release: yak-1.1.0 ISO and disk image boot with BIOS and UEFI, SHA256SUMS OK; make book 0 broken links |
Log
-
2026-10-24 – Setup: Rust nightly 1.101 (rustup), target
x86_64-unknown-none, Limine v11.x-binary. M1: kernel boots via BIOS and UEFI, prints "Hello from KernelTry!" on serial, colour bars on the framebuffer (1280×800×32). -
2026-10-24 – M2: kernel split into library + binary. Custom test framework in
kernel/src/testing.rs. Integration teststests/boot.rs(Limine responses) andtests/should_panic.rs. Bug #1 found and fixed (runner did not detect test mode). -
2026-10-24 – I decided that Claude implements everything itself (no exercises for me).
-
2026-10-24 – M3: own PSF2 parser (
font.rs, Terminus 8×16, OFL) and text console (console.rs) with wrapping, tab, backspace, scrolling.print!/println!write to screen and serial.without_interruptsprepared. Addedscripts/screenshot.pyfor visual checks. -
2026-10-24 – M4: own GDT (null, kernel code 0x08, kernel data 0x10, TSS 0x18) and TSS with IST1 = 20 KiB double fault stack. CS reloaded via
retfq. -
2026-10-24 – M5: own IDT (
idt.rs), handlers for all exceptions 0–21 (interrupts.rs), readable page fault error codes. Double fault runs on IST1 (verified by a test). Limitation: real stack overflows do not fault yet because the Limine stack has no guard page (fixed with M9). -
2026-10-24 – M6: 8259 PIC remapped to 32–47, PIT at 100 Hz,
time.rs(ticks,uptime_ms,sleep_ms), spurious IRQ 7/15 handling. Bug #2: Limine masks LAPIC LINT0, so no PIC interrupt arrived → local APIC is now disabled via MSR. Works with BIOS and UEFI. -
2026-10-24 – M7: PS/2 keyboard on IRQ1. Ring buffer in the handler,
scancode::Decoder(set 1, Shift, Caps, Ctrl, Alt, AltGr, E0/E1). Layouts DE (default) and US.keyboard::read_key()sleeps race-free withsti; hlt.main.rshas an echo mode until the shell exists. New:scripts/qemu-monitor.pyfor QEMU monitor queries. -
2026-10-24 – Repository translated to English (my request). Kernel now linked with GNU ld (
ld.bfd) instead of rust-lld; added binutils make targets (disasm,symbols,sections,addr2line). -
2026-10-24 – M8:
mem/module withPhysAddr/VirtAddr, HHDM offset, bitmap frame allocator (mem/pmm.rs). Bitmap logic is independent of Limine and unit-tested with fake memory maps. 253 MiB usable with-m 256M. Base revision check moved to the very start ofkernel::init(). -
2026-10-24 – M9: own 4-level paging code (
mem/paging.rs: translate incl. huge pages, map/unmap,map_fresh,map_mmio). Kernel stacks with guard pages in PML4 slot 510 (mem/stack.rs);kmainswitches to a 64 KiB guarded stack right after init.tests/stack_overflow.rsnow overflows for real via endless recursion and checks CR2 is inside the guard page. Observed: Limine sets EFER.NXE and CR0.WP; its HHDM maps RAM + framebuffer only, no MMIO (LAPIC needsmap_mmio). -
2026-10-24 – M10: own linked-list allocator (
mem/heap.rs: first fit, splitting, address-ordered free list with coalescing) as#[global_allocator]. Heap in PML4 slot 508, 1 MiB initially, grows on demand up to 1 GiB.alloccrate enabled. -
2026-10-24 – M11: shell. Console got a character grid, inverted cursor, non-destructive
\x08and an ANSI subset (clear, home, erase line, colours). Serial input via IRQ4 +input::TerminalDecoder(UTF-8, ANSI arrows, Ctrl keys);input::read_key()merges keyboard and serial.shell/: parser with quotes/escapes, line editor (cursor movement, history, tab completion, Ctrl+C/L/U/A/E), 16 commands incl.mem,memmap,cpu,reboot,poweroff. Panics are now also shown on screen.scripts/e2e-shell.pydrives the real kernel over the serial port (make e2e,make check). Stage 1 complete: 99 in-kernel tests + 19 E2E steps green. -
2026-10-24 – I confirmed stage 2 in the proposed order (M12–M15) and asked to be consulted on open questions.
-
2026-10-24 – M12: ACPI parser (
acpi.rs: RSDP → XSDT/RSDT → MADT with CPUs, I/O APICs, overrides).paging::ensure_hhdm_mappedmaps ACPI tables / MMIO missing from Limine's HHDM. Local APIC enabled (lapic.rs), its timer calibrated against PIT channel 2 (polled, no IRQ) and running periodic at 100 Hz on vector 32. I/O APIC (ioapic.rs) routes keyboard (GSI 1) and COM1 (GSI 4); 8259 remapped + fully masked; PIT channel 0 unused. New shell commandacpi.make checknow also runs the E2E test under UEFI. Timer accuracy: 6.00 s kernel vs. 6.00 s wall clock (BIOS), 5.99 s (UEFI). -
2026-10-24 – M13: preemptive round-robin scheduler (
task/): context switch inglobal_asm!(callee-saved regs + RSP), new threads start via a trampoline, each with an 8-page guarded stack that is freed after exit. Blocking waits:Until(tick),Input(woken by keyboard/COM1 IRQs),Join(tid). Idle thread halts.sleep_ms,input::read_key,keyboard::read_keyblock instead of spinning. Timer handler sends EOI before callingtask::on_tick(which may switch threads). Shell:psanddemo [n](parallel prime-counting workers). -
2026-10-24 – I decided: the file system must be a real persistent disk (not a RAM fs). Roadmap changed: M14 = storage driver, M15 = FAT32, M16 = user space.
-
2026-10-24 – Code base formatted with rustfmt (
kernel/rustfmt.toml, max_width 120) in a separate commit. -
2026-10-24 – M14: PCI config space enumeration (
drivers/pci.rs), AHCI driver (drivers/ahci.rs: port init, IDENTIFY, READ/WRITE DMA EXT, FLUSH, polled, 4 KiB bounce frame → max 8 sectors per command),BlockDevicetrait +RamDisk(drivers/block.rs). Globaldrivers::DISKprobed once at boot. QEMU gets a SATA disk on AHCI port 0: persistentbuild/disk.imgin run mode, a fresh image per test binary, a scratch image for E2E.scripts/mkdisk.shbuilds FAT32 images fromrootfs/. Shell:lspci,disk,hexdump. Bug #3 (double probe) found and fixed. -
2026-10-24 – M15: FAT32 (
fs/fat32.rs): mount (superfloppy or first FAT32 MBR partition), FAT cluster chains with a one-sector FAT cache written through to all FAT copies, directories with 8.3 + long file names (LFN, UTF-16, checksum), read/write/append/truncate, mkdir, rm (empty dirs only), rename/move, FSInfo free-count hints,formatfor RAM-disk tests. Timestamps from the new CMOS clock driver (drivers/rtc.rs).fs::ROOTis mounted at boot. Shell: current directory in the prompt (kernel:/path>),ls cd pwd cat write append touch mkdir rm mv stat df date.make testnow validates every test disk withfsck.fat -nand mtools (scripts/check-test-disks.sh); the E2E test boots twice on the same disk to prove persistence. Session was interrupted once before the commit;make checkre-run green on resume. Thepoweroffexit-status-33 observation from before the cut did not reproduce (4/4 sessions exited with 0). -
2026-10-24 – M16: user space. GDT gets user data/code (DPL 3, order fixed by
sysret), TSS moves to 0x28, RSP0 is set on every context switch.syscall/sysretvia STAR/LSTAR/FMASK with an assembly stub (arch/x86_64/syscall.rs). Per-process address spaces (mem/address_space.rs): own PML4, kernel half shared –paging::initpre-creates all upper-half PML4 entries so they never change. ELF64 loader (process/elf.rs), process table with spawn/wait/kill and exit statuses (process/mod.rs), 7 syscalls (process/syscall.rs: exit, write, read, sleep_ms, getpid, uptime_ms, yield) with page-table checks of every user buffer. Exceptions from ring 3 kill only the process. User programs in Rust inuser/(runtimeulib+hello,upper,fault), linked at 0x40_0000 with GNU ld, installed into/binon every disk. Shell:run <path>, or just the program name for/bin(also in tab completion). Found: Limine sets USER on its upper-half intermediate page tables – cleared inpaging::init(BUGS.md pitfalls). Stage 2 complete: 156 in-kernel tests + 6 test kernels + 52 E2E steps green (BIOS and UEFI). -
2026-10-24 – I agreed to stage 3 (M17–M19) as proposed.
-
2026-10-24 – M17: per-process file descriptor table (
process::Handle: stdin, stdout, file with offset, directory snapshot; max 32) and current directory (inherited from the shell). New syscalls 7–13:open(READ/WRITE/CREATE/TRUNCATE, writes append),close,readdir,stat,getcwd,unlink,mkdir;read/writework on files.FatFs::read_atreads at an offset. The process table lock is never held during disk I/O. Argument block is now NUL-separated (ulib::Args), so quoted arguments with spaces survive.ulib::fs(File,Dir,stat,cwd); new programscat,ls,cp,fstest. The kernel shell's built-inls/catare gone –/bin/lsand/bin/catreplace them. Shell tests capture program output. -
2026-10-24 – M18: user heap. Syscall 14
brk(new_end): heap right after the ELF image, max 64 MiB, pages mapped zeroed when growing and freed when shrinking (address space borrowed out of the process table so the lock is not held while zeroing).AddressSpace::map_freshnow rolls back on failure, newAddressSpace::unmap.ulib::heap: first-fit allocator with an address-ordered free list and coalescing as#[global_allocator]– programs can useVec,String,BTreeMap,format!. New programssort(files or typed lines,-r) andheaptest. -
2026-10-24 – M19 was split: M19 = process syscalls + Ctrl+C, M20 = the shell in user space.
-
2026-10-24 – M19: syscalls 15–17
spawn(path, args)(child inherits cwd + output),wait(pid, *WaitStatus)(children only, 128-byte status with kill reason),kill(pid)(children only). Parents, orphans (removed from the table when they end) and a foreground process (inherited by children of the foreground process, given back to the parent at exit). Ctrl+C is detected in the interrupt handlers – serial byte 0x03, PS/2 via a tiny Ctrl tracker on the raw scancodes – and kills the foreground process unless it ignores interrupts (then the key is delivered as 0x03).task::wake+ interruptibleread/wait(input::read_key_or_abort,task::join_or_abort) so a blocked process dies at once.process::Options/spawn_with.ulib::process(spawn,wait,kill,run), new programspawntest,fault spin|sleep. Found: empty user buffers come with dangling pointers (0x1) – zero-length ranges are now always accessible. -
2026-10-24 – M20:
/bin/shin user space (user/src/bin/sh/). It compiles the kernel shell'sline_editor.rsandparser.rsvia#[path](shared code,shell/keys.rsprovides the key types on both sides) and decodes the terminal bytes ofread(which now delivers arrows/Home/End/Delete as VT100 sequences) with its ownkeys::Decoder. Built-ins cd (new syscall 18chdir), pwd, echo, run, history, help, exit; kernel built-ins through the transitional syscalls 19kshell/ 20kcommands; programs viaspawn/wait. The kernel starts/bin/shas init (process::run_init: foreground, ignores Ctrl+C) and falls back to the kernel shell when it is missing or exits. Bug #4 (foreground stolen by an orphan) found by the E2E test and fixed: the console is lent to a child only while its parent waits for it. Stage 3 complete: 163 in-kernel tests + 6 test kernels + 72 E2E steps green (BIOS and UEFI), init is /bin/sh. -
2026-10-24 – I agreed to stage 4 (M21–M23) as proposed.
-
2026-10-24 – M21: pipes (
process/pipe.rs: 64 KiB queue, reader/writer counts kept by cloning/droppingPipeEnds, blocking withWait::Pipe(id)+task::notify, EOF and EPIPE). Syscalls 21–24pipe,dup,dup2,isatty; children inherit fds 0–2 atspawn;kshelloutput follows fd 1./bin/sh:a | b | c,>,>>,<viadup2around each stage, errors to stderr, Ctrl+C in a pipeline kills the rest of it.ulib::io::read_linereturnsNoneat EOF / Ctrl+D and only echoes on the console;read_all,read_stdin,read_input.cat/sortread stdin, newwc,grep,pipetest. -
2026-10-24 – M22: syscalls 25–28
sysinfo(176-byte struct: uptime, memory, kernel heap, file system, CPU count/vendor/ brand, CMOS date),proclist(64-byte entries: tid, parent, state, user/kernel, CPU ticks, name),rename,seek. File descriptors now have one position for reads and writes (FatFs::write_at: overwrite, extend, zero-filled gaps); newopenflag APPEND (used by>>). New programsps,mem,uptime,df,date,mkdir,rm,touch,stat,mv; these names are no longer offered throughkshell(the kernel shell keeps its built-ins as fallback). -
2026-10-24 – M23:
/bin/edit(user/src/bin/edit/):buffer.rs(lines of chars, cursor with remembered column, insert/newline/backspace/delete joining lines; checked byedit --selftest) and a VT100 screen with horizontal and vertical scrolling, inverted status bar, partial redraw of the cursor line. ^S saves, ^Q quits (twice with unsaved changes). Kernel: syscalls 29termsizeand 30ignore_interrupt(the editor takes Ctrl+C itself), console SGR 7/27 (inverse video). Stage 4 complete: 169 in-kernel tests + 6 test kernels + 90 E2E steps green (BIOS and UEFI), 26 programs in /bin. -
2026-10-24 – I agreed to stage 5 (M24–M26) and installed
gcc(needed as host linker for-Zbuild-std). -
2026-10-24 – M24:
arch/x86_64/fpu.rsenables x87/SSE (CR0.EM/TS off, MP/NE on, CR4.OSFXSR/OSXMMEXCPT) and records a clean initial FXSAVE image. Every thread owns a 512-byteFxState;schedule()doesfxsave64for the outgoing andfxrstor64for the incoming thread (eager). The kernel stays soft-float. User programs now use their own targetuser/x86_64-kerneltry-user.json(SSE2, hard-float ABI, static, small code model, red zone allowed) with-Zbuild-std=core,alloc. New programfputest. Check: with the save/restore removed, all 4 workers report corrupted XMM. -
2026-10-24 – I chose our own INIT/SIPI start (not Limine's MP feature). M25 was split: M25 = starting the cores, M26 = scheduling on them, M27 = network.
-
2026-10-24 – M25:
arch/x86_64/smp.rs.pmmreserves one frame below 1 MiB before anything else; the trampoline (global_asm!, 16 → 32 → 64 bit, data accesses hand-encoded because the assembler rejects label differences in memory operands) is copied there, patched with its physical addresses, the kernel PML4 and a per-AP stack, and temporarily identity-mapped. INIT, 10 ms, SIPI (twice if needed) per AP via new LAPIC IPI functions.ap_main: own GDT/TSS (now arrays per CPU) with its own double fault stack, shared IDT, FPU/SSE, syscall MSRs, local APIC, thenhltuntil aWAKE_VECTORIPI brings a job (smp::run_on). QEMU runs with-smp 4;cpulists the online CPUs. -
2026-10-24 – M26: the scheduler runs on every core. Per CPU: current thread, idle thread (APs turn their start-up context into it), LAPIC timer (calibrated once on the BSP; only CPU 0 advances
time::ticks). Shared ready queue;schedule()keeps the scheduler lock across the context switch and the next thread releases it (finish_switch), so a thread that is still being switched out (on_cpu) can never be picked by another CPU.block_currentreplaced bywait_for(reason, ready): mark blocked first, then check – no lost wake-ups across CPUs; wakers on a thread stillon_cpujust set it running. Idle CPUs get a wake-up IPI when a thread becomes ready. Syscall stub: per-CPU slots throughswapgs/IA32_KERNEL_GS_BASE, swapped back before interrupts are enabled.psshows the CPU a thread runs on.KERNEL_SMP=<n>selects the core count. -
2026-10-24 – M27:
drivers/e1000.rs(82540EM: reset, MAC from RAL/EEPROM, 32 RX / 8 TX descriptors with 2 KiB DMA buffers, polled) andnet/(packet.rs: Ethernet II, ARP, IPv4 with checksum, ICMP echo, UDP with pseudo-header checksum;mod.rs: static config for QEMU user networking 10.0.2.15/24 via 10.0.2.2, ARP cache + resolution, net thread polling every 10 ms, answers ARP and pings, ping replies, UDP sockets with receive queues; waits useWait::Net). Syscalls 31–35net_info,ping,udp_socket,sendto,recvfrom(5th argument in R8);Handle::Udp. Programsping,netinfo,udpecho. QEMU gets-netdev user -device e1000(KERNEL_NETDEV_OPTSfor extras). Bug #5 (run_oncould starve the target CPU's idle thread) fixed. Stage 5 complete: 185 in-kernel tests + 6 test kernels + 94 E2E steps (BIOS + UEFI). -
2026-10-24 – I want all of the stage 6 ideas; order M28–M33 chosen by dependencies.
-
2026-10-24 – M28:
arch/x86_64/tsc.rscalibrates the time stamp counter against PIT channel 2 (50 ms, after the LAPIC calibration);time::uptime_us. Syscall 36clock_us. Ping replies are time-stamped in µs (pingprints ms with three decimals – the receive time is still when the net thread polls, i.e. up to 10 ms late). New programtime <program>. -
2026-10-25 – M29:
net/tcp.rs(state machine, go-back-N retransmission with RTT-based RTO, windows, loopback for our own address), syscalls 37–40tcp_connect/tcp_listen/tcp_accept/shutdown,read/write/closeon connections, programsncandechod, kernel commandnetstat. Bug #6 fixed: the boot CPU's idle thread did not runsmp::run_onjobs (hang when a thread on another CPU sent a job to CPU 0); one idle loop for all CPUs now, regression test added. IPIs are sent with interrupts off; SMP-robust leak tests (pmm::frames_lost). -
2026-10-25 – M30:
net/dhcp.rs(DISCOVER/OFFER/REQUEST/ACK with the broadcast flag;net::initwaits up to 3 s per step, static fallback otherwise); the network config is now mutable (dns,dhcpflag) and accepts all packets to our MAC while unconfigured. DNS client in user space (ulib::dns: query building, compressed-name parsing, retries; server fromnet_info, which now reports DNS and DHCP). Programshost,wget(HTTP/1.0,-O file),httpd(files below the cwd, directory listings, 403/404/405). -
2026-10-25 – M31: per-process environment in the kernel (inherited at
spawn, init getsPATH=/bin,HOME=/), syscalls 41–43setenv/getenv/environ,waitflag WNOHANG./bin/shrewritten around it:$NAME/${NAME}/$?/$$/$#/$0..$9expansion (not in '...',\$escapes),#comments,NAME=value/export/unset,$PATHlookup,2>/2>>/2>&1, background jobs (&,jobs,wait,fg, "Done" before the prompt), scripts (sh file args,sh -c,source/.,#!files run throughsh,set -e),true/false,exitdefaults to$?. New programenv. Found: lines of concurrent programs were mixed mid-line becauseprintln!wrote every format piece separately – theulibprint macros now format first and write once. -
2026-10-25 – M32: measured first (300 KB through
wc: 0.12 s;read_atin 4 KiB steps: 94 ms – the disk itself needs only ~3 ms, the time went into walking the FAT chain and the directory on every call). Now:BlockCache(write- through sector cache, 512 KiB, LRU by eighths) under the root file system,read_atreads contiguous clusters with one request, FatFs caches the last cluster chain and the last path lookup (both dropped on any write). Result:read_at94 → 5 ms,wcof 300 KB 0.12 → 0.038 s. AHCI completes commands by MSI (PCI capability list,Device::enable_msi): the waiting thread blocks onWait::Diskinstead of spinning (single commands get slower, ~2×, but the CPU is free); polling remains for early boot. Bug #7 (an idle CPU only noticed threads woken by its own interrupts at the next tick) found withKERNEL_SMP=1and fixed (task::preempt_idleat the end of waking interrupt handlers). -
2026-10-25 – M33:
mem::reclaim_bootloader_memory(first thing inkernel_main, on our own stack): copies every page table that lives in bootloader memory (paging::copy_kernel_tables, the mappings stay identical), points every thread (task::retarget_cr3) and every CPU (smp::run_on+ CR3 reload) at the new PML4, then frees the regions (pmm::release_region; the bitmap now covers them from the start). The memory map is copied at boot (pmm::boot_memmap) because Limine's lives in that memory. QEMU with 256 MiB: ~11.7 MiB gained. Demand paging:brkonly moves the heap end; a not-present user fault inside the heap maps a zeroed page and retries (process::handle_page_fault), syscalls populate heap pages before checking user buffers. Stage 6 is complete. -
2026-10-25 – M34: signals (
process/signal.rs): dispositions, pending mask,kill(pid, sig),sigaction,sigreturn; delivery when returning to ring 3 after a syscall or a timer/wake interrupt. Handlers run through a trampoline inulibthat saves all registers itself – the kernel only pushessig, handler, rflags, rip(so the user target now hasdisable-redzone). Ctrl+C sends SIGINT (raw 0x03 only forignore_interruptprograms without a handler);sleepis interruptible;$?of a signalled child is 128 + signal; sh built-inkill [-SIG] pid|%job,kill -l. Bug #8 (MSI test assumed one interrupt per command – MSIs coalesce in the APIC) found while running with 2 CPUs. -
2026-10-25 – M35:
/bin/shbecame a small POSIX-like language: tokenizer + recursive-descent parser (syntax.rs) into lists / and-or / pipelines / compound commands / functions, executed with aFlowresult;$((...))(arith.rs),test/[(testcmd.rs),read,shift,:, wildcards (glob.rs), continuation prompt, compound commands with redirections and in pipelines (cat f | while read l; do ...; done), background compound commands viash -c. Ctrl+C stops loops (SIGINT handler + children killed by SIGINT). Kernel: file offsets are now shared betweendup-ed descriptors (the shell's fd save/restore re-read the same line forever otherwise), user stacks grow on demand up to 1 MiB (4 pages mapped at start). Bug #9 (run_onpriority inversion between idle thread and waiter) fixed. -
2026-10-25 – M36: threads.
thread_spawn/thread_exit/thread_join/gettid, every user thread has anowner(the pid) in the scheduler; process end with running threads viaexiting(the main thread joins the others before freeing the address space); futexes (process/futex.rs) andulib::sync::Mutex, thread-safe user heap,ulib::thread::spawn. TLB shootdown forbrkshrinking with threads. Kernel: sleepingsync::Mutexfor the disk and the root file system (found while writing its test:bool::then_somebuilt the guard eagerly, so a failedtry_lockunlocked somebody else's lock -thenis lazy). -
2026-10-25 – M37: QEMU now runs
-cpu max(TCG;KERNEL_CPUoverrides). SMEP + SMAP on every CPU that has them, user memory only insidecpu::user_access(stac/clac);read_stdinnow copies withcopy_to_userafter its wait. XSAVE with XCR0 = x87 | SSE | AVX, 1 KiBFpuStateper thread; the signal trampoline usesxsave64. User programs stay SSE2 and detect AVX at run time. Bug #10 (test IDTs without IRQ vectors, exposed by the slower CPU model) fixed. -
2026-10-25 – M38: QEMU's e1000 has no MSI, so
net::probe_irqfinds its I/O APIC input by trying GSI 16-23 with a software-raised interrupt (ICS); the net thread now sleeps until the card interrupts (ping to the gateway 2–10 ms → ~0.5 ms; loopback packets wake it too). TCP window scaling (shift 3, 256 KiB buffers, 128 segments in flight); DHCP lease renewal thread (T1 renew, T2 rebind, static fallback at the end). Stage 7 is complete. -
2026-10-26 – User wrote a project definition ("KernelTry – Understand the Kernel"): recorded as a proposal in
docs/GOALS.md. Stage 8 (M39–M46) planned around its release criteria. M39:README.md(overview, screenshotdocs/images/shell.png, host packages, quick start, documentation map), Makefile finds OVMF on Fedora and Debian/Ubuntu (OVMF ?=, override withmake OVMF=<file>). Found while setting up a fresh Ubuntu container: no toolchain pin (stable rustc fails on the user target), hard-coded Fedora OVMF path – both feed M40. -
2026-10-26 – I chose the license (ECPL v1.2, my own text) and the name KernelTry. M40:
rust-toolchain.tomlpins nightly-2026-10-26 (rustc 1.101.0-nightly 76456a688) with rust-src, rustfmt and thex86_64-unknown-nonetarget;scripts/check-deps.sh/make deps(Fedora/Debian package names, OVMF, rustup) is the first step ofmake check.license-fileset in both Cargo manifests. -
2026-10-26 – M41:
syscheckfound five kernel bugs on its first runs – #11 a huge length froze the machine (populatewalked every page), #12 an empty buffer with a null pointer panicked the kernel, #13readdirlost an entry on EFAULT, #14 a user copy raced withbrkin another thread (kernel page fault → panic), #15 TLB shootdowns waited for idle CPUs (seconds, or forever with busy CPUs). Fixes: boundedpopulate, empty copies never touch the pointer, check-before-advance inreaddir, check + copy under the process table lock in ≤ 64 KiB pieces, aTLB_VECTORIPI.make soak(10 rounds ≈ 1–2 min) andmake stressadded.syscheck racewith 4 CPUs: 4 → ~3500 heap shrinks in 5 s. DESIGN.md listed the wake-up IPI as 0x60; it is 0xF0 (fixed). -
2026-10-26 –
make stress(5 passes) of the M41 commit: green – 20 × E2E 126/126 with 1/2/4 CPUs andqemu64/UEFI, everymake testgreen, soak 10 rounds, 26 min in total. M42: #16 fixed (sys_writein 64 KiB pieces,sendtosize check before the copy); the open items became "Known limitations of release 1.0". M43–M45: walkthroughs, experiments (all four run and measured), HACKING.md with syscall 52unameas the worked example,CHANGELOG.md,make docs-check. -
2026-10-26 – User switched the license to the GNU GPL v3 (taken as
GPL-3.0-or-later, the FSF's recommended wording) and wants a pre-release before 1.0. M46:LICENSEfrom Ubuntu'sbase-files(/usr/share/common-licenses/GPL-3, identical to the FSF'sgpl-3.0.txt– gnu.org itself is blocked by the sandbox proxy), dependency licenses checked (limine, lock_api, scopeguard: MIT OR Apache-2.0; spin: MIT; Limine bootloader: BSD-2-Clause – all GPLv3-compatible), version 1.0.0-rc.1 – renamed to 0.8.0 at my request (0.x = not yet stable, as SemVer intends). -
2026-10-26 – Stage 8 merged into
main(FreakySneaky787/yak-kernel#1, merge commita75812b). I published the GitHub pre-release v0.8.0 on that commit (tag pushes are not possible from Claude's sandbox). -
2026-10-26 – I decided the direction for the next 1–2 years: a learning platform for self-learners and hobby kernel developers; an English course in which learners rebuild the kernel chapter by chapter (one branch per chapter), published as a website; I steer, Claude builds. Written down in
docs/ROADMAP.md;docs/GOALS.mdupdated; stages 9 (CI, 1.0) and 10 (course infrastructure) planned. -
2026-10-26 – M47: CI on GitHub Actions (FreakySneaky787/yak-kernel#2). Fedora was tested for the first time (its mirrors are blocked in the sandbox):
make deps, the OVMF path (/usr/share/edk2/ovmf/OVMF_CODE.fd) and the whole suite work there unchanged. The only failure was the TLB shootdown test's 50 ms limit (~75 ms on the runners, bug #17), now 1 s. A Ubuntu job takes ~3.5 min, Fedora ~4 min. -
2026-10-26 – CI paid off at once: besides #17 it showed a Fedora-only failure (
sortkilled below its stack). Root cause, reproduced locally with a new test: an SMP race inprocess::spawn_with– a new program could run its first syscall before its process table entry existed (#19), plus a panic handler that needed the heap. A local E2E repetition also showedsleep_msending up to a tick early (#18). All three fixed with regression tests that fail on the old code;make checkandmake stress STRESS_N=1green. -
2026-10-26 – M47 merged (FreakySneaky787/yak-kernel#2,
7f8f5b2). M49: the website is mdBook overdocs/(no copy of the docs); mdBook 0.4.52 is a host tool (cargo install), not a kernel dependency. GitHub Pages must be switched to "GitHub Actions" by me before the first deploy. -
2026-10-26 – M50 + pilot chapters 1–3. Chapters live as folders in
main(the sandbox cannot push other branches; I chose folders). Every code block on a chapter page that names a file is checked against the chapter folder, so the text cannot drift from the code. Found while writing chapter 3: a dash (U+2013) is drawn as?by a Latin-1 font table – kept as a "what can go wrong" note. -
2026-10-26 – The project is called YAK – Yet Another Kernel (my decision; "KernelTry" was the working name). Renamed everywhere except in this log: boot banner,
uname, disk labelYAK, user targetuser/x86_64-yak-user.json, the course chapters, website and docs. -
2026-10-27 – Stage 11 after an outside review of the docs. Checked every point against the code: the block-cache contradiction was real (bug #20), "the purpose is undecided" was not (GOALS fixes it). M52 found bug #21 while laying out the thread stacks. M53's fault tests found no bug, but two kinds of damage beyond lost clusters (chain longer than size, two names after rename) – both inherent to FAT32 without a journal, now documented.
-
2026-10-27 – Stage 12 (M54–M59).
make stress(5 passes) on the M59 commit: first red – the new TCP loss test ran into the 30 s limit of its test kernel with 4 CPUs (bug #22, the test's size, not a hang); after the fix green: 20 × E2E 135/135 with 1/2/4 CPUs andqemu64/UEFI, everymake testgreen (TCP loss test ≤ 5.0 s), soak 10 rounds, about 33 min in total. -
2026-10-27 – M48: version 1.0.0. I decided to release without waiting for the outside reader.
-
2026-10-29 – M60: a first-reader pass before handing the pilot to somebody else. The code was fine – every chapter folder builds alone – but a reader typing along from the pages would have got stuck at the end of chapters 3 and 4: the lines in
kmainthat call the new code were only in the folders. A coverage script showed it; the pages now show those lines, anddocs/HACKING.mdsays every change a learner has to make appears on the page.make checkbefore the commit found bug #24 (a test, not the kernel). -
2026-10-29 – C5: chapter 5, interrupts and exceptions. A handler for a crash is only proven by a crash, so the chapter's kernel takes
fault=page/fault=stackon its command line andmake testboots it three times. The double fault comes without guard pages (those are part II): the stack pointer is pointed at unmapped memory and pushed to. Every claim on the page that says what happens was checked by a run –-d intshows the chainv=0e,v=08, triple fault when the IST index is missing. -
2026-10-29 – C6: chapter 6, PIC and timer. Bug #2 (Limine masks LINT0, so PIC interrupts never arrive with the local APIC on) is still true with Limine 11. The chapter first switched the APIC off like M6 did – green locally, red in CI: QEMU 8.2 drops the interrupts anyway (bug #25). The chapter now runs on a CPU without APIC. The counter-check without the PIC remap is the best example for chapter 5's "one place off" warning: the timer IRQ lands on vector 8, and the double fault handler prints the interrupted RIP as its error code.
docs/LEARN.mdnamed a PIT divisor of 11932; the code has always computed 11931. -
2026-10-29 – C7: chapter 7, the keyboard – part I is complete. A keyboard test needs somebody to type, so
run-qemu.shfeeds QEMU's monitor through a FIFO and types withsendkeyonce the kernel says it is ready (only bash and QEMU, no new host tool). I kept the layout to US: it is one table of five strings, and QEMU's key names are US positions; a German layout is experiment 1. The page says honestly that with a 100 Hz timer the lost wake-up costs at most one tick –sti; hltmatters once nothing else wakes the CPU. Chapters 5–7 also lost a compiler warning (a function cast straight to an integer in a test). -
2026-10-29 – C8: chapter 8, physical memory – part II begins. I kept the chapter to the bitmap allocator and left out what the reference kernel added later (taking back Limine's memory, a frame below 1 MiB for the other CPUs). The strongest test takes every frame there is and chains them through memory; it is also the only thing that catches the most dangerous mistake, counting Limine's memory as usable – the kernel itself boots fine with it.
-
2026-10-29 – C9: chapter 9, paging. My test that
maprefuses a page inside a huge page first assumed the HHDM was built from 1 GiB pages; a diagnostic walk showed 2 MiB pages, with 4 KiB pages at the edges of the ranges. The same walk over the framebuffer showed bug #26: its 2 MiB entries carry the PAT bit, andtranslate– mine and the reference kernel's – read it as an address bit. Fixed in both, with a test in both. -
2026-11-01 – C10: chapter 10, the heap – part II is complete. The heap starts with nothing mapped; the first
Boxmaps its first 64 KiB, so the chapter needs noinitand shows that a heap is just frames andmap. I kept the spin lock with interrupts on and wrote on the page why that holds only while no handler allocates (the reference kernel turns them off). The counter-check with unrounded sizes did not corrupt memory silently: Rust's debug checks stopped it at the first misaligned gap pointer. -
2026-11-01 – C11: chapter 11, a first shell – part III. I kept it to the keyboard: serial input, escape sequences, history and completion are named on the page as what the reference shell has besides. The decision that carries the chapter is that every piece writes to a
core::fmt::Write, so the tests compare the exact bytes a command prints – including the\x08 \x08of the line editor. -
2026-11-01 – C12: chapter 12, ACPI and the APIC – part IV begins, and the course's QEMU has a local APIC again. All tests were green and
sleep_ms(1000)said 1010 ms when I timedsleep 5000in the shell on the host clock: 2.7 s. The PIT in mode 3 gave two interrupts per period through the I/O APIC, so the APIC timer was calibrated to 5 ms (bug #27). Mode 2 fixed it, and a test now checks the calibration against QEMU's known APIC rate – a clock cannot be tested against itself. -
2026-11-01 – C13: chapter 13, threads and a scheduler. Chapter 10 had said the heap's lock may stay with interrupts on as long as no handler allocates; this chapter's timer handler does, so the heap now locks with interrupts off. Removing that again passed six test runs – the race is rare – so I wrote a test that provokes it: a thread allocating in a loop while main wakes up twenty times; without the fix it hangs every time.
-
2026-11-01 – Bug #28 in chapter 13, found while testing chapter 14: the boot hung about once in 20 because
task::initbuilt the scheduler in steps with interrupts on. I booted in a loop until it hung and read RIP through the QEMU monitor – the idle thread'shlt, withmainlost. Fixed in chapters 13 and 14. -
2026-11-01 – I decided to move the FPU chapter (M24) from part IV to part VI: the course kernel has no SSE and no user programs yet, so there is nothing to save. C14: chapter 14, the other CPUs. The trampoline is the reference kernel's, explained; the APs only run jobs, the scheduler stays on the BSP. Every mistake I tried in the start path ended in a triple fault of the whole machine, so the page shows how to read QEMU's
-d intlog. -
2026-11-06 – C15–C20 in one day, one PR each. I first decided to finish the course to part VIII, then the same day to stop at chapter 20 for now, and to release the course as 1.1.0 (M61). CI found one timing assumption in C15, load runs two more (bugs #29, #30); a GitHub runner hung for 11 minutes in
apt-getonce (re-run, green). In C18fsck.fatcaught my own first version of the write tests (two mounts of one disk, a wrong free count). M61, release 1.1.0:make check,make stressandmake releasegreen at the first run;make coursefound bug #31 (a test, not the kernel) – fixed in chapters 15–20, then 20/20.
Known limitations of releases 1.0 and 1.1 (sorted in M42, checked for 1.1 in M61)
Release blockers were defined as "a program can crash, hang or exhaust the kernel" (docs/GOALS.md: isolated
programs, reliability). All of those found so far are fixed (bugs #11–#16). The rest are documented limitations:
they make YAK smaller than a production system, but they do not break the promises of release 1.0.
Security model
- Single user, no permissions: every program may signal any process (
kill), read and write every file, and use the kernel-command bridgekshell– includingreboot,poweroff,panicandint3, which exist for teaching. Isolation means memory isolation: a program cannot read or corrupt another program's or the kernel's memory. - The kernel heap grows on demand but never shrinks.
User space
- No AVX-512; the ELF image is mapped eagerly (heap and stack on demand); no thread-local storage; thread stacks are fixed at 256 KiB (64 slots); no SIGCHLD/SIGSTOP/alarm, no signal masks; a CPU exception cannot be caught as a signal.
/bin/sh: no here-documents, no[...]character classes in patterns; variables hold up to 4096 bytes (256 of them);&&/||/|/&must be separate words; functions are not inherited bysh -cbackground shells; built-ins, functions and loops inside a pipeline must fit their output into one pipe (64 KiB) – more blocks until Ctrl+C; background jobs share the keyboard with the shell.- Input lines up to 4096 characters; on a serial terminal they wrap correctly only if it is at least as wide as the console (160 columns).
kshell/kcommandsbridge the commands that are still kernel built-ins: cpu, acpi, lspci, disk, hexdump, memmap, layout, demo, colors, version, int3, panic, reboot, poweroff, write, append, echo, sleep, clear, help. Without/binon the disk, the kernel shell has nols/cat.
Files and network
- FAT32 without a journal: a power loss or disk error in the middle of a command can leave lost clusters, a chain
longer than its file or (rename) two names for one file –
fsck.fatrepairs it, nothing runs it at boot (M53). - FAT32 only;
read/write_atre-walk the cluster chain per call; directory handles are snapshots; no truncate-to-length. - IPv4 only: no fragmentation, no SACK / persist timer, DNS A records only; the e1000 interrupt line is found by probing (no AML interpreter).
Hardware and tools
- QEMU is the reference machine (q35, e1000, AHCI, PS/2, COM1); real hardware is not a goal of 1.0.
make limine-tool(bios-install for USB/HDD images) exists but has not been tried.psCPU percentages only cover threads that still exist (dead threads are reaped with their counters).- Under TCG (no KVM)
make checktakes about 2 minutes on a warm build,make stress(5 passes) about 30 minutes.
Course (1.1)
- The course ends at chapter 20 (my decision of 2026-11-06): ring 3 with one address space and two system calls. Own address spaces, programs from the disk, processes, the network and hardening are in the reference kernel and its walkthroughs, not yet in the course. No exercises, diagrams or glossary yet (phase E).
- The pilot (chapters 1–4) still waits for its first outside reader.
Open after 1.0
- A first reader: somebody who did not build YAK follows README → the course → one experiment and reports where they got stuck. That is the real test of the "understandable" goal.
- Optional: license headers (
SPDX-License-Identifier: GPL-3.0-or-later) in every source file – the GPL's "How to Apply" recommends a notice per file.
Next step
1.1.0 is prepared (M61): version, CHANGELOG, status texts; the course has chapters 1–20 (part IV ended with one
scheduler for all CPUs, part V goes from PCI and a SATA disk to FAT32, a block cache and disk interrupts, chapter 20
runs code in ring 3). Next: I create the tag v1.1.0 on the merge commit and publish the GitHub release
(docs/RELEASING.md, steps 6–8); the release workflow attaches the files. After that nothing is planned until I
decide again – chapters 21–36 (plan in docs/ROADMAP.md) and phase E wait for that decision; an outside reader for
the course is still open.