|
|
Subscribe / Log in / New account

Kroah-Hartman: Meltdown and Spectre Linux Kernel Status - Update

Kroah-Hartman: Meltdown and Spectre Linux Kernel Status - Update

Posted Jan 20, 2018 0:37 UTC (Sat) by jcm (subscriber, #18262)
In reply to: Kroah-Hartman: Meltdown and Spectre Linux Kernel Status - Update by khim
Parent article: Kroah-Hartman: Meltdown and Spectre Linux Kernel Status - Update

I doubt it’s possible in microcode. Let’s look at it:

1. Speculative loads. Only thing you could do in microcode is turn off all speculation, or maybe cause every load to be serializing (similar).

2. Branch prediction. You could turn off the indirect predictors (but that’s what IBRS does).

3. Permission checking during speculation. You can either turn off speculation or the cache, or kill the TLBs or you’re pretty much out of options.

You can’t just replace random instructions in microcode, or add complex behavior, for several reasons:

1. Not every instruction is microcoded. Fast path instructions don’t even touch the microcode sequencer.

2. The patch RAM for the microcode is *tiny* and can’t carry anything like that kind of patch.

3. Complex TLB and branch predictor logic isn’t under direct algorithmic control via microcode, only certain aspects of it are. You can alter behavior, tweak chicken bits, play with control signals...but you can’t add what isn’t already in the design.

Microcode isn’t magic. It’s there to fix mostly run of the mill complex instructions that don’t behave correctly, or to whack chicken bits, and so on.


to post comments

chicken bit - what a lovely term

Posted Jan 20, 2018 10:08 UTC (Sat) by sdalley (subscriber, #18550) [Link] (4 responses)

I didn't know what "chicken bit" meant, so I had to look it up.

It's an enable/disable bit for a chunk of functionality on a CPU (or other ASIC) than you can manipulate to chicken-out of that functionality if it turns out to be buggy or busted.

chicken bit - what a lovely term

Posted Jan 20, 2018 11:59 UTC (Sat) by johnny (guest, #10110) [Link]

Same here. Can't wait to use the term myself. :)

chicken bit - what a lovely term

Posted Jan 20, 2018 23:00 UTC (Sat) by dezgeg (subscriber, #92243) [Link]

Another name that I've heard at a chip company is CYA bit (Cover Your Arse bit).

chicken bit - what a lovely term

Posted Jan 21, 2018 1:24 UTC (Sun) by jcm (subscriber, #18262) [Link]

It makes sense to have them - modern microprocessors have more components than small cities and can never be 100% bug free even if you are the best of the best. So adding 10,000 inexpensive control bits is cheap insurance against needing to dig out from something like this

chicken bit - what a lovely term

Posted Jan 21, 2018 8:03 UTC (Sun) by scientes (guest, #83068) [Link]

I've had to use one of these before, for the OLPC 1.75. Static branch prediction was bugged. (I didn't figure this out).

Kroah-Hartman: Meltdown and Spectre Linux Kernel Status - Update

Posted Jan 20, 2018 21:21 UTC (Sat) by dwmw2 (subscriber, #2063) [Link]

" 2. Branch prediction. You could turn off the indirect predictors (but that’s what IBRS does).
No it doesn't.
qv.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds