Get the latest tech news

Speculating the entire x86-64 instruction set in seconds (2021)


<p>As cheesy as the title sounds, I promise it cannot beat the cheesiness of the technique I’ll be telling you about in this post. The morning I saw Mark Ermolov’s tweet about the undocume

The morning I saw Mark Ermolov’s tweet about the undocumented instruction reading from/writing to the CRBUS, I had a bit of free time in my hands and I knew I had to find out the opcode so I started theory-crafting right away. The XCHG may seem a bit overkill compared to a simpler solution popping the stack but as far as my experiments went, the processor is too smart to split the execution if the routine is non-returning so we need to feed the branch target buffer what it wants. I’ve gotten a bit greedy and wanted to also know if the instructions speculatively execute or if they halt the queue for the sake of side-channeling the results so I went ahead and collected another piece of information, which comes from a rather unexpected performance counter:

Get the Android app

Or read this on Hacker News

Read more on:

Photo of seconds

seconds

Related news:

News photo

Google’s Gemini can build an entire vacation itinerary ‘in a matter of seconds’

News photo

Show HN: From SERP to LLM-Ready Data Markdown in Seconds with Firesearch

News photo

Formula E debuts Gen3 Evo race car: All-wheel drive unlocks 0-60 mph in 1.82 seconds