Technical Writing

Blog

Technical writing on software engineering, system design, and development practices.

All posts

·
linux-kernel device-drivers

Finding a DSI driver bug by diffing registers against the vendor image

A register diff is only as good as the blocks its baseline covers. A review of a DSI start failure ruled out every candidate register fix, yet the fault sat in a block its baseline skipped, where a masked write had left an undocumented bit set.

·
hardware-testing ci

A lease broker for one test board shared by CI and coding agents

Per-caller locks don't compose when CI jobs, coding agents and I share one fragile board. What worked better was one broker that holds the board's login, leases the board with two fencing tokens and quarantines it only when an outcome is unknown.

·
nix nixos

Sharing a host's Nix store with a builder VM

A build VM can read its host's Nix store through a read-only share. The host's files stay immutable; the VM's view of them doesn't. Its garbage collector can hide shared files behind overlay whiteouts unless the VM is told, on every start, that those files are still needed.

·
nix remote-builds

Isolating a Nix remote builder in a microVM on a shared host

Distributed builds lend spare capacity to CI, but build scripts execute untrusted code. I isolate them in a builder VM with its own kernel, restricted access and resources the host can reclaim.

·
nix ctf

Rebuilding a kernel exploit with Nix

A kernel exploit targeted a program that NixOS keeps at a different path. Rebuilding dirtyfrag with Nix meant finding and pinning the exact executable, while exposing a kernel bug the build sandbox cannot contain.

·
nix ctf

A page-cache bug the Nix sandbox can't contain

A decryption can fail and still leave the file it read changed. The move that lands root isn't reading the dropped binary - it's reading what the recipe retargets.

·
obd-ii diagnostics

My car has been grading itself since 2018. It keeps throwing the grades away.

Every car since ~1996 runs self-tests on its own emissions hardware and grades them against the manufacturer's limits - then overwrites the results. This is about keeping them: reading OBD-II Mode 06 and watching the drift toward failure months before a fault code sets.

·
nix phoenix

One Script, Two Websites, Sixty Seconds

Deploying a Phoenix app and a static site to a single DigitalOcean droplet with Nix flakes and deploy-rs - the full config, the scaling model, and what I'd do differently.