danos/system/kernel
Daniel Samson 1b1c587c14
library: the harness keeps the subscribers, and an id belongs to whoever opened it
Three services had each written the same thing and got it three different
ways: input polled the process list to notice a dead subscriber, and only
when someone else subscribed; the power service never noticed at all; the
device manager noticed drivers but not subscribers. The harness owns the
table now, driven by the events a protocol declares — it registers on the
reserved verb, frames each event once, posts to everyone interested without
waiting on any of them, and reclaims a slot when the kernel says its owner
died. Interest masks moved to the envelope, so a subscriber that wants only
mice asks the same way everywhere.

Two consequences the plan had not foreseen. The device manager now hears a
supervised child's death twice, once as its supervisor and once as a
subscriber, so restart backoff counted every crash twice and gave up after
half as many; it retires the id before counting. And the kernel's published
exit table had eight slots for what is now six subscriptions in a plain
boot, so it holds sixteen.

The other half is a hole the design named early and left standing: a
backend handed out a small integer and then honoured it from anyone. A
process that guessed a file's node id read another client's file; a display
layer had no owner at all, so any client could reconfigure or destroy any
layer; a USB device token was never checked against the client that opened
it. Each is now bound to the task that opened it, and a wrong owner gets
exactly what an unknown id gets — the refusal must not become the oracle
the identical answers elsewhere were designed to remove. Closing a file
changed with it: it used to succeed unconditionally, which would have told
a caller which ids existed.

Suite 111/111, with a new case in which one process holds a file and a
layer, hands both ids to a second process, and finds them untouched after
that process has tried everything with them.
2026-08-01 09:05:26 +01:00
..
architecture/x86_64 kernel: user memory is reached only through a checked copy 2026-07-31 20:57:49 +01:00
acpi.zig kernel: the IOMMU backends move behind the architecture boundary 2026-07-30 07:16:08 +01:00
console.zig console: page-wrap instead of scrolling — never read the framebuffer 2026-07-21 19:22:59 +01:00
device-model.zig kernel: flatten the device/discovery code, merge power into acpi, rename fdt 2026-07-22 21:49:20 +01:00
devices-broker.zig kernel: user memory is reached only through a checked copy 2026-07-31 20:57:49 +01:00
fdt.zig kernel: flatten the device/discovery code, merge power into acpi, rename fdt 2026-07-22 21:49:20 +01:00
font.psf Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
heap.zig docs: audit all 'what's next' sections against the code; fix stale comments 2026-07-22 02:23:51 +01:00
iommu.zig kernel: the IOMMU backends move behind the architecture boundary 2026-07-30 07:16:08 +01:00
ipc-synchronous.zig init: /protocol replaces the ServiceId registry 2026-08-01 02:39:07 +01:00
ipc.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
irq.zig init: /protocol replaces the ServiceId registry 2026-08-01 02:39:07 +01:00
kernel.zig iommu: enable Intel VT-d translation with per-claim device confinement 2026-07-26 18:31:27 +01:00
log-ring.zig build: the unix paths retire — configuration, logs, and volumes move into the danos tree 2026-07-31 19:41:35 +01:00
log.zig kernel: the boot transcript on screen, every line timestamped 2026-07-21 19:09:34 +01:00
platform.zig kernel: flatten the device/discovery code, merge power into acpi, rename fdt 2026-07-22 21:49:20 +01:00
pmm.zig M14b: DMA memory (dma_alloc / dma_free) 2026-07-10 19:43:59 +01:00
process.zig library: the harness keeps the subscribers, and an id belongs to whoever opened it 2026-08-01 09:05:26 +01:00
scheduler.zig kernel: user memory is reached only through a checked copy 2026-07-31 20:57:49 +01:00
sync.zig kernel: contain a fatal fault — name the task, release the BKL before halt 2026-07-14 09:05:10 +01:00
tests.zig library: the harness keeps the subscribers, and an id belongs to whoever opened it 2026-08-01 09:05:26 +01:00
user-memory.zig kernel: user memory is reached only through a checked copy 2026-07-31 20:57:49 +01:00
vfs.zig init: /protocol replaces the ServiceId registry 2026-08-01 02:39:07 +01:00
wall-clock.zig kernel: tagged log ring — per-line pid/name/level records, klog_status 2026-07-21 15:30:28 +01:00