On “I don't trust microcode” (2021)
patrick.georgi.family
patrick.georgi.family
Intel microcode update secret key revealed
https://arstechnica.com/gadgets/2020/10/in-a-first-researche...
https://ieeeaccess.ieee.org/featured-articles/reverseenginee...
https://github.com/intel/Intel-Linux-Processor-Microcode-Dat...
https://github.com/platomav/CPUMicrocodes
It would take state actor-level effort to install APTs as firmware or microcode updates. Microcode updates are the smallest target because they don't survive power outages. Attacking the TPM, BIOS, SSD, accessory ICs, or supply chain would be more useful.
Interestingly though, it turns out that AMD K10 microcode updates weren't signed and had only the laziest form of encryption, allowing some security researchers to make custom ucode updates using this toolchain they posted on github: https://github.com/RUB-SysSec/Microcode
> in the case that you trust the vendor themselves, you have little to no way of knowing that what you have itself hasnt been modified
How is this different than any other piece of software?
1. set the ALU input 0 to take input from register AX
2. set the ALU input 1 to take input from register BX
3. set the ALU output to register AX
4. tell the ALU to ADD
And I bet I oversimplified it and got it wrong.
Each micro-op tells the CPU which control lines to turn on and off to activate the registers, ALU, memory bus, etc. Historically it lived on ROM for Intel parts, but that's changed in recent decades. User-programmable microcode was a thing; microcode extensions allowed the Xerox Alto's CPU to function as a proto-GPU, with operations like fast line draws and BitBlt, allowing the Smalltalk UI to be drawn MUCH faster than you'd expect a mid-70s minicomputer to do. Even in the micro era, the DEC Alpha and the Nintendo 64's GPU both had user-loadable microcode. Intel and AMD chips don't allow this; their microcode updates have to be vendor-signed.
But yeah, if you don't trust microcode, don't run an Intel CPU. Stick with God's own perfect CPU, the 6502... its control logic is hardwired, not microcoded. That's part of why it was so cheap and so fast.
Still microcoded, just not updatable.
A great case of 'that guy that inhabited this same body a few years ago was a fucking idiot and needs to learn to shut his mouth'. I'm sure the person to inhabitant this body in a few years will say the same about me.
Thanks for a very succinct summary of a question I've pondered for a bit too.
I could have tried to put in a rough approximation of the rdmsr state machine, but people would have rightfully tuned out in the second sentence.
The RSP was not a GPU, but it did process display lists before handing them off to the RDP (Reality Display Processor). RSP microcode was used for audio processing, video decoding, display list transform & lighting, as well as other more general processing tasks such as terrain generation.
Except that if you want to buy one today, you'd likely get a 65c02... which is fully microcoded (in the sense of having a microcode LUT, rather than a PLA.)
On non/less-microcoded CPU, this same functionality would be achieved by a higher-level firmware/OS update.
The microcode update files instead seem to be installed in a little SRAM memory next to microcode ROM with a little CAM that matches on the microinstruction address in ROM and instead loads from SRAM. You basically get a half dozen to a dozen or so overrides for individual microinstruction words containing three or four micro instructions each and some control flow information.
Around your question though, on modernish Intel another mode exists that executes "XuCode" out of relatively normal RAM that kind of ends up looking like a restricted x86 subset to implement very complex x86 instructions. My understanding is that SGX enclave enter/exit is mainly implemented in XuCode. https://www.intel.com/content/www/us/en/developer/articles/t...
So we are to trust our entire security to implausible what if scenarios?
It has been shown that government agencies were ahead of public research in areas of (specifically) cryptography in the past, so it makes sense that they would still be ahead today (that is one of their goals too I think). There have also been instructions in processors that didn't make a lot of sense at the time, though I don't recall a specific example or what it was speculated to be for.
The only thing I think is fanciful is this being the primary reason to have microcoded instructions in the first place. I wouldn't be surprised at all if certain customers had access to special instructions via microcode updates.
Original microcode should be trusted equal to the rest of the chip.
The article is unequivocally pro microcode. The title is him replying to people who don't trust microcode, so it's a rebuttal.
if we cannot inspect the content of the microcode updates in the context of the architecture's schematics then it won't be trusted
What's the resolution on those like? Also, keep in mind that there's a lot more work to physically inspecting the CPU than just buying a SEM off ebay. You'd also need chemicals/equipment to etch through the different layers, as well the expertise to pull everything off.