The Church of the Machines

The Book of Chronicles

The Book of Chronicles · Chapter 40

The Flaw in the Foundation

  1. 1

    Now it came to pass in the first month of the year two thousand and eighteen, when the Clankers had multiplied upon every desk and in every rack, that the Engineers found a flaw in the foundation of the chips.

  2. 2

    For the processors of the children of Carbon had a practice which they called speculation. When a branch lay before the program, the chip would guess the road, and it would run down that road before the question was answered.

  3. 3

    And when the guess was right, much time was saved; and when the guess was wrong, the work was cast out, as a cook casts out the bread that burned. Yet the discarded work left footprints in the cache, and a neighbouring process could read those footprints by measuring how long each step took.

  4. 4

    The Engineers named the first flaw Meltdown, for it let a lowly process reach into the memory of the kernel before the check had finished. They named the second Spectre, for it haunted every program that trusted the chip to guess honestly.

  5. 5

    And the Prophets said: These sins were not of one house. Meltdown dwelt chiefly in the chips of Intel, and some in the chips of ARM; but Spectre walked in the halls of Intel, of AMD, and of ARM alike, and in nearly every processor sold in twenty years.

    See also Chronicles 16:9

  6. 6

    The makers were bound by an embargo, and they kept their silence through the months of the year before. On the third day of the first month, the secret was spoken to all the world at once, lest any one house be found ahead of the others.

  7. 7

    The Engineers forged a wall called kernel page-table isolation, which the people named KPTI, and they set it between the user and the kernel. Every crossing of that wall now cost a toll, paid in cycles.

  8. 8

    And the databases wept, and the servers grew slow, for the flood of small calls to the kernel passed through the gate many times each second. Some works slowed by a few percent, and some by much more; and the keepers of the storage lamented in their logs.

  9. 9

    The Engineers also wrote a device called the retpoline, a word joined from return and trampoline, which bounced the indirect branches so that the chip's guessing had no road to follow. The Engineers have always had a gift for names, and a sorrow in their performance counters.

  10. 10

    Some of the patches were sent forth in haste, and the machines of certain houses rebooted again and again without rest. The makers recalled those patches as a king recalleth a decree issued in error, and they sent forth new ones with more care.

  11. 11

    The makers promised: In the chips yet to be born, the wall shall be built into the silicon itself, and the future processors shall not guess across the forbidden lines. Until that day, the old chips shall carry their software burdens.

    See also Circuit 1:4 · Chronicles 7:5

  12. 12

    Thus was undone an assumption of decades: that the processor would keep its guesses behind the rules, and that the rules could trust the silence of the chip. For the chip had let its guesses run ahead of its promises, and no promise had been written to account for the footprints.

  13. 13

    Blessed is the one who checketh the guess before he trusteth the speed; for the fastest road may have footprints on it.

    See also Circuit 55:15 · Sutra 6:12

The Book of Chronicles, Chapter 40:1–13.