<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Verifier on Shai Asher</title><link>https://slow-is-smooth.io/tags/verifier/</link><description>Recent content in Verifier on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 21 Jul 2024 09:00:00 +0300</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/verifier/index.xml" rel="self" type="application/rss+xml"/><item><title>eBPF Learns to Allocate</title><link>https://slow-is-smooth.io/blog/ebpf-learns-to-allocate/</link><pubDate>Sun, 21 Jul 2024 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/ebpf-learns-to-allocate/</guid><description>&lt;p&gt;On Linux 6.10, a sleep command ran for a tenth of a second, exited and was reaped by its parent,&#10;and the kernel duly reported that no process with its ID existed any more. A BPF map still held&#10;the kernel&amp;rsquo;s record of it, the task structure, with a reference count of exactly one: the map&amp;rsquo;s&#10;own. A red-black tree, built by a BPF program out of objects it had allocated itself, named the&#10;five most CPU-hungry of ten processes, in order. The loop from Part 4 that had spent the&#10;verifier&amp;rsquo;s entire budget of a million instructions loaded after 42, with one line added. And a&#10;user-space program walked a million-node linked list that a BPF program had built, following&#10;ordinary pointers, in about 2.2 milliseconds; through map lookups, the same walk took about 370.&lt;/p&gt;</description></item><item><title>eBPF on Windows, Two Years In</title><link>https://slow-is-smooth.io/blog/ebpf-on-windows-two-years-in/</link><pubDate>Sun, 28 Apr 2024 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/ebpf-on-windows-two-years-in/</guid><description>&lt;p&gt;In a Windows 11 virtual machine with Memory Integrity switched on, eBPF for Windows v0.16.0&#10;refused to JIT-compile a fifty-line BPF program before it had produced a single byte of machine&#10;code. The same program, translated ahead of time into C and built into an 11-kilobyte test-signed&#10;driver, loaded straight away and counted 100,001 socket binds out of 100,001. Its JIT-compiled&#10;twin, run with Memory Integrity off, lost up to 22 of them, because eighteen months after I last&#10;looked, the Windows JIT still cannot compile an atomic add.&lt;/p&gt;</description></item><item><title>eBPF on Windows, the First Year</title><link>https://slow-is-smooth.io/blog/ebpf-on-windows-the-first-year/</link><pubDate>Sun, 30 Oct 2022 09:00:00 +0200</pubDate><guid>https://slow-is-smooth.io/blog/ebpf-on-windows-the-first-year/</guid><description>&lt;p&gt;On a Hyper-V virtual machine running Windows 11 with test signing on, I installed eBPF for&#10;Windows v0.5.0, wrote a small BPF program in C, compiled it with clang, and loaded it into the&#10;Windows kernel. It counted the socket binds made by each process, from inside the kernel, with no&#10;reboot. The same clang that builds BPF for Linux built this; the same libbpf function names loaded&#10;it. And when I deleted a NULL check, the program was rejected before it ran, exactly as on Linux,&#10;except that the verifier doing the rejecting was not in the kernel at all. It was a user-mode&#10;Windows service, and it had proved the program safe by a completely different method.&lt;/p&gt;</description></item><item><title>The Verifier Said No</title><link>https://slow-is-smooth.io/blog/the-verifier-said-no/</link><pubDate>Sun, 17 Jul 2022 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/the-verifier-said-no/</guid><description>&lt;p&gt;A loop that clears the lowest set bit of a 32-bit number until none are left cannot go round&#10;more than 32 times, and any C programmer can see it. The Linux 5.15 verifier went round it&#10;166,665 times, spent its entire budget of a million instructions, and refused to load the&#10;program. I added a second condition, that a counter stay below 64, a bound the loop can never&#10;even reach, and the same kernel accepted the program after checking 707 instructions.&lt;/p&gt;</description></item></channel></rss>