<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Luther Monson</title>
    <link>https://luth.io/tags/linux/</link>
    <description>Recent content in Linux on Luther Monson</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 26 Sep 2026 16:20:00 -0700</lastBuildDate>
    <atom:link href="https://luth.io/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Cross-Platform Process Containment: Job Objects vs Process Groups vs cgroups</title>
      <link>https://luth.io/blog/2026/09/process-containment-job-objects-process-groups-cgroups/</link>
      <pubDate>Sat, 26 Sep 2026 16:20:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/process-containment-job-objects-process-groups-cgroups/</guid>
      <description>&lt;p&gt;Every turn a &lt;a href=&#34;https://luth.io/blog/2026/08/shipmates-persona-based-ai-coding-crews/&#34;&gt;shipmates&lt;/a&gt; crew member takes is a subprocess. It&amp;rsquo;s&#xA;&lt;code&gt;claude&lt;/code&gt; or the &lt;code&gt;codex&lt;/code&gt; app-server. That in turn spawns shells, &lt;code&gt;go test&lt;/code&gt;, &lt;code&gt;npm&lt;/code&gt; or whatever the task calls for. Two&#xA;things have to be true about that tree. When a turn ends or gets killed, the &lt;em&gt;whole&lt;/em&gt; tree goes, including the&#xA;grandchildren. And if somebody sets a memory or CPU budget, the budget applies to the whole tree, not just the&#xA;process I happened to start.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bind Mounts Across Mount Namespaces: Four PRs and a Container Escape</title>
      <link>https://luth.io/blog/2026/09/bind-mounts-across-mount-namespaces/</link>
      <pubDate>Thu, 24 Sep 2026 21:02:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/bind-mounts-across-mount-namespaces/</guid>
      <description>&lt;p&gt;GitHub Actions has a &lt;code&gt;container:&lt;/code&gt; key that runs a job&amp;rsquo;s steps inside an image of your choosing. It&amp;rsquo;s popular because&#xA;it gives you a reproducible toolchain without building a custom runner image. On a self-hosted runner it works by&#xA;having the runner drive Docker. On &lt;a href=&#34;https://luth.io/blog/2026/08/ephemerd-one-daemon-every-os/&#34;&gt;ephemerd&lt;/a&gt;, &amp;ldquo;Docker&amp;rdquo; is a shim that&#xA;speaks the Docker API and creates containers in containerd. Getting bind mounts right through that shim took four PRs&#xA;in a week. A couple of months later the version that worked turned out to be an escape.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A 1 TB Test: Building a Memory Watchdog for go test</title>
      <link>https://luth.io/blog/2026/09/memory-watchdog-for-go-test/</link>
      <pubDate>Tue, 22 Sep 2026 20:48:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/memory-watchdog-for-go-test/</guid>
      <description>&lt;p&gt;On August 16th a &lt;code&gt;server.test.exe&lt;/code&gt; from &lt;a href=&#34;https://luth.io/blog/2026/08/shipmates-persona-based-ai-coding-crews/&#34;&gt;shipmates&lt;/a&gt; climbed to&#xA;roughly &lt;strong&gt;1 TB of commit charge&lt;/strong&gt; on my Windows workstation. Windows Terminal was hosting several agent sessions in&#xA;tabs. It hard-faulted with &lt;code&gt;E_OUTOFMEMORY&lt;/code&gt;, and every one of those sessions died at the same moment. It wasn&amp;rsquo;t the&#xA;first time either. An earlier one hit about 236 GB through an infinite &lt;code&gt;filepath.Dir&lt;/code&gt; loop.&lt;/p&gt;&#xA;&lt;p&gt;The machine has 128 GB of RAM. Commit charge doesn&amp;rsquo;t care. It&amp;rsquo;s backed by the page file, and Windows will happily let&#xA;a process reserve-and-commit until the commit limit is gone. Then everything else on the desktop starts failing&#xA;allocations too.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kata Containers for CI: Boot Cost Isn&#39;t the Problem, File I/O Is</title>
      <link>https://luth.io/blog/2026/09/kata-containers-for-ci/</link>
      <pubDate>Thu, 03 Sep 2026 21:35:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/kata-containers-for-ci/</guid>
      <description>&lt;p&gt;Of the three platforms &lt;a href=&#34;https://luth.io/blog/2026/08/ephemerd-one-daemon-every-os/&#34;&gt;ephemerd&lt;/a&gt; runs jobs on, Linux has the weakest&#xA;isolation. Windows jobs get a Hyper-V isolated container with its own kernel. macOS jobs get a whole VM. A Linux job is&#xA;an ordinary runc container sharing the host kernel. A kernel escape from a Linux job is a host compromise.&#xA;&lt;a href=&#34;https://katacontainers.io/&#34;&gt;Kata Containers&lt;/a&gt; fixes that by putting each container in a lightweight VM with its own&#xA;kernel. It plugs into containerd as just another runtime handler. So I added it in&#xA;&lt;a href=&#34;https://github.com/ephpm/ephemerd/pull/155&#34;&gt;#155&lt;/a&gt;, measured it, and left it off by default. This post is why.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Per-Tenant Network Policy in One Process: ePHPm&#39;s eBPF Thread Tags</title>
      <link>https://luth.io/blog/2026/08/ephpm-ebpf-per-vhost-network-policy/</link>
      <pubDate>Fri, 28 Aug 2026 20:40:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/ephpm-ebpf-per-vhost-network-policy/</guid>
      <description>&lt;p&gt;In multi-tenant mode &lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; serves every site in &lt;code&gt;sites_dir&lt;/code&gt; from one process. Every&#xA;tenant&amp;rsquo;s PHP runs as the same OS user on the same pool of ZTS threads. A thread that just served &lt;code&gt;blog.example&lt;/code&gt; will&#xA;serve &lt;code&gt;shop.example&lt;/code&gt; a few milliseconds later. That&amp;rsquo;s the density win. It also means the kernel has no idea which&#xA;tenant is behind a given &lt;code&gt;connect()&lt;/code&gt;. As far as Linux is concerned it&amp;rsquo;s all &lt;code&gt;ephpm-web&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Most of the isolation work in ePHPm happens above the kernel. That covers &lt;code&gt;open_basedir&lt;/code&gt;, the function denylist,&#xA;per-site databases and KV keyspaces. Network is the one place where that isn&amp;rsquo;t enough. This week we brought eBPF in&#xA;to give the kernel a per-tenant identity. It went from a roadmap doc on Wednesday morning to merged that evening&#xA;(&lt;a href=&#34;https://github.com/ephpm/ephpm/pull/413&#34;&gt;#413&lt;/a&gt;, aimed at v0.8.1). v0.8.1 never got a release because its Linux&#xA;legs failed to link. v0.8.2 shipped with the BPF object silently stubbed out. v0.8.3 was the first release that&#xA;carried it. This post covers what it enforces and what it costs. It also covers what broke on the way out the door&#xA;and what it doesn&amp;rsquo;t do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My iptables Rule Matched 0 Packets in 9.8 GB</title>
      <link>https://luth.io/blog/2026/08/iptables-rule-zero-packets/</link>
      <pubDate>Wed, 26 Aug 2026 20:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/iptables-rule-zero-packets/</guid>
      <description>&lt;p&gt;After a week of Windows firewall rules that &lt;a href=&#34;https://luth.io/blog/2026/08/windows-container-egress-firewall/&#34;&gt;listed fine and enforced nothing&lt;/a&gt;,&#xA;I went back to the Linux side of &lt;a href=&#34;https://github.com/ephpm/ephemerd&#34;&gt;ephemerd&lt;/a&gt; feeling pretty good about it. iptables is&#xA;the boring, well-understood one. Then I looked at the packet counters on a live node. I found a rule that had never&#xA;matched a packet in its life. That node had pushed 9.8 GB through the same chain.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-rules-i-thought-i-had&#34;&gt;The rules I thought I had&lt;/h3&gt;&#xA;&lt;p&gt;Job containers sit on a CNI bridge, &lt;code&gt;10.88.0.0/16&lt;/code&gt;, with the host on &lt;code&gt;10.88.0.1&lt;/code&gt;. ephemerd puts its egress policy in its&#xA;own chain, &lt;code&gt;EPHEMERD-FORWARD&lt;/code&gt;. &lt;code&gt;FORWARD&lt;/code&gt; jumps to it for anything to or from the container subnet. From a live node:&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Benchmark Was 4x Wrong Because of WSL</title>
      <link>https://luth.io/blog/2026/08/benchmark-4x-wrong-wsl-drvfs-cwd/</link>
      <pubDate>Thu, 20 Aug 2026 20:45:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/benchmark-4x-wrong-wsl-drvfs-cwd/</guid>
      <description>&lt;p&gt;I do most of my benchmarking on a Windows box in WSL2. It&amp;rsquo;s the machine on my desk with 32 threads and 62 GB of RAM.&#xA;Everybody who does that learns the first rule early: don&amp;rsquo;t put your data on &lt;code&gt;/mnt/c&lt;/code&gt;. DrvFs is the 9p-backed mount that&#xA;exposes the Windows drives inside WSL, and it&amp;rsquo;s slow for file-heavy work. So the databases, the docroot and the build&#xA;output all live on the WSL ext4 disk. My scaling harness for &lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; even says so in&#xA;capital letters in its README.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Escaping WSL: Booting My Own Linux VM Through Hyper-V&#39;s HCS API</title>
      <link>https://luth.io/blog/2026/06/escaping-wsl-hcs-linux-vm/</link>
      <pubDate>Sun, 14 Jun 2026 20:12:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/06/escaping-wsl-hcs-linux-vm/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been building &lt;a href=&#34;https://github.com/ephpm/ephemerd&#34;&gt;ephemerd&lt;/a&gt;, a daemon that runs self-hosted GitHub Actions runners&#xA;with a fresh environment per job. On a Windows host, Windows jobs run in Hyper-V isolated containers. Linux jobs still&#xA;need a Linux kernel from somewhere. The obvious answer on Windows in 2026 is WSL2, and that&amp;rsquo;s what I used first. It worked&#xA;great from my terminal and fell over the moment ephemerd became a real Windows service.&lt;/p&gt;&#xA;&lt;h3 id=&#34;wsl2-doesnt-do-localsystem&#34;&gt;WSL2 doesn&amp;rsquo;t do LocalSystem&lt;/h3&gt;&#xA;&lt;p&gt;A Windows service that wants to create containers and Hyper-V VMs runs as &lt;code&gt;LocalSystem&lt;/code&gt;. WSL2 doesn&amp;rsquo;t support that context&#xA;at all. You get &lt;code&gt;WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED&lt;/code&gt; and that&amp;rsquo;s the end of the conversation. There&amp;rsquo;s no flag for it. WSL is a&#xA;per-user feature and a service account isn&amp;rsquo;t a user.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PHP Signal Safety - The Init Ordering Bug Nobody Warns You About</title>
      <link>https://luth.io/blog/2026/04/php-signal-safety-init-ordering/</link>
      <pubDate>Sun, 12 Apr 2026 20:15:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/04/php-signal-safety-init-ordering/</guid>
      <description>&lt;p&gt;Last week I wrote about &lt;a href=&#34;https://luth.io/blog/2026/04/why-rust-for-php-embedding/&#34;&gt;why ePHPm embeds PHP from Rust&lt;/a&gt; and promised the&#xA;signal bug its own post. Here it is. It&amp;rsquo;s the kind of bug where the fix is about ten lines and the explanation is the&#xA;whole post. Nothing in PHP&amp;rsquo;s embed documentation (there&amp;rsquo;s barely any) tells you that initializing PHP has&#xA;process-wide side effects. Those side effects assume PHP is the only thing in the process.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-setup&#34;&gt;The setup&lt;/h3&gt;&#xA;&lt;p&gt;The first working version of &lt;code&gt;ephpm serve&lt;/code&gt; looked like every async Rust program. It was &lt;code&gt;#[tokio::main]&lt;/code&gt;-style. Build&#xA;the runtime, then inside it load config, initialize PHP and start the HTTP server. PHP requests run on&#xA;&lt;code&gt;spawn_blocking&lt;/code&gt; threads. Simplified:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
