Page 1 of 2

Intel CPU bug

Posted: Wed Jan 03, 2018 11:36 am
by LawBeefaroni
Am I reading this right, Intel CPU are about to take a 17%+ performance hit?


'Kernel memory leaking' Intel processor design flaw forces Linux, Windows redesign

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 11:43 am
by Isgrimnur
Crucially, these updates to both Linux and Windows will incur a performance hit on Intel products. The effects are still being benchmarked, however we're looking at a ballpark figure of five to 30 per cent slow down, depending on the task and the processor model. More recent Intel chips have features – such as PCID – to reduce the performance hit. Your mileage may vary.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 11:46 am
by Carpet_pissr
Wow, I guess I am glad I have delayed upgrading my old AMD CPU.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 12:14 pm
by hentzau
Yeah, this is a huge topic of conversation around work today. We're concerned that we're going to have an entire generation of PCs that we're going to have to retire about a year and a half early. That wasn't budgeted for this year. Probably talking 10,000 PCs (conservatively.) Haven't even thought about what it will mean to our server farms...

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 12:20 pm
by Isgrimnur
I guess I'll start looking at the Ryzens for my new rig upgrade, which I will probably shop for over the next few days once this chest cold settles in and makes it to the point where I don't want to move.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 3:21 pm
by Carpet_pissr
Isgrimnur wrote: Wed Jan 03, 2018 12:20 pm I guess I'll start looking at the Ryzens for my new rig upgrade, which I will probably shop for over the next few days once this chest cold settles in and makes it to the point where I don't want to move.
Are not the latest gen Intel chips somewhat immune to this slowdown? Coffee Lake in particular. If not, I will definitely be going AMD (I was fully planning on Coffee Lake for my much needed desktop overhaul project).

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 3:31 pm
by Isgrimnur
PCWorld
There isn’t any concrete data yet, but speculation is that the bug affects all Intel x86 CPUs produced over the past 10 years, regardless of the OS you’re running or whether you have a desktop or laptop. There are some reports that say newer Intel CPUs are less impacted than older ones, but the full extent is unclear.
...
In a message to the Linux Kernel Mailing List, AMD’s Tom Lendacky asked for Linux’s “Kernel Page Table Isolation” (KPTI) fix to not apply to Team Red’s processors.

“AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against,” he wrote. “The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would result in a page fault.”

AMD CPUs could potentially wind up suffering a performance hit as collateral damage, though. It depends on how the final patches for the Intel CPU kernel bug vulnerability are implemented. Operating system makers could code in exceptions for AMD processors to keep them at full speed, as Lendacky requested for the Linux kernel. But operating system vendors may also take a salted earth approach and force the fix onto all x86 processors just to be safe.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 4:50 pm
by Zarathud
AMD never had the performance benefit so, at best, it stays the same.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:04 pm
by stessier
Zarathud wrote: Wed Jan 03, 2018 4:50 pm AMD never had the performance benefit so, at best, it stays the same.
Not exactly. Or maybe I don't understand what you're saying.

The Intel chips got a benefit from the predictive portion and having the kernel already loaded. They are losing the loaded kernel benefit. The AMD chips got a benefit from both and, if they are excluded from the software changes, would maintain both since their prediction couldn't pass info to the kernel. If they are forced to reload the kernel, they would suffer the same hit as Intel.

Or at least that is what I've read.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:04 pm
by xwraith
As a DBA type I'm kinda worried about this, especially as some of the bleeding edge testing on the Linux side seems to indicate that IO heavy workloads are going to be some of the most affected.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:08 pm
by xwraith
Hmm...
Edit: possible explanation of above
Spoiler:

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:22 pm
by xwraith
Some commentary on what MacOS does to mitigate...
Spoiler:

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:23 pm
by xwraith
And more commentary on the Windows solution...
Spoiler:
Sorry if this is spammy... :oops:

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:34 pm
by hitbyambulance
nope, this is quite informative. keep at it...

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 5:58 pm
by Daehawk
I thought this was an very old thread on the Intel CPU that had some math error many years ago and the thread had been updated. I need to look that one up. i think it was a math co-processor bug.

EDIT: Good Lord!!! That was 1994. Much older than I thought.

https://en.wikipedia.org/wiki/Pentium_FDIV_bug

This one one seems worse in some ways and not in others. Its slower but at least it returned the correct numbers :) If I could upgrade Id go Ryzen or a 4700 most likely. Maybe in 4 years Id go 8700.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 6:26 pm
by xwraith
Okay now for some Linux links:

What got my attention today is I saw a link to this comment on the Linux Kernel mailing list by an AMD developer saying that:
AMD processors are not subject to the types of attacks that the kernel
page table isolation feature protects against. The AMD microarchitecture
does not allow memory references, including speculative references, that
access higher privileged data when running in a lesser privileged mode
when that access would result in a page fault.
The implication is of course, that Intel's architecture allows it.

For example this tweet:
Spoiler:
Page table isolation (PTI), which I believe is the mitigation that is being discussed for this issue has been shown to impact performance:

http://lkml.iu.edu/hypermail/linux/kern ... 01274.html

The original poster sees a 5% hit on an in memory workload, so probably not taxing disk IO that much.
There is a bit more here too with some worse case scenarios >20% impact.
Phoronix did some bench marking too

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 6:32 pm
by xwraith
Google has announced their mitigations:

https://support.google.com/faqs/answer/7622138
https://googleprojectzero.blogspot.com/ ... -side.html

These seem to be the CVEs associated with the issues (nothing there yet, but I imagine in the next 24 hours the information will be there) I'll speculate now that Variant 3 is what caught my eye this morning.

Edit: Added CVEs, and link to Project Zero, updated what CVEs mean, and who it appears to affect.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 6:48 pm
by xwraith
Ah new words for us IT people to bandy about:

Welcome "Meltdown and Spectre" to our lexicon

In brief, Meltdown seems to be Intel only. Every processor since the Pentium Pro in 1995! They do speculate that it could be possible for the attack to work against other OOO processors, but they weren't able.

Spectre seems to affect everybody.
On affected systems, Meltdown enables an adversary to read memory of other processes or virtual machines in the cloud without any permissions or privileges, affecting millions of customers and virtually every user of a personal computer. We show that the KAISER defense mechanism for KASLR [8] has the important (but inadvertent) side effect of impeding Meltdown. We stress that KAISER must be deployed immediately to prevent large-scale exploitation of this severe information leakage
6.4 Limitations on ARM and AMD
We also tried to reproduce the Meltdown bug on several ARM and AMD CPUs. However, we did not manage to successfully leak kernel memory with the attack described in Section 5, neither on ARM nor on AMD. The reasons for this can be manifold. First of all, our implementation might simply be too slow and a more optimized version might succeed. For instance, a more shallow out-of-order execution pipeline could tip the race condition towards against the data leakage. Similarly, if the processor lacks certain features, e.g., no re-order buffer, our current implementation might not be able to leak data. However, for both ARM and AMD, the toy example as described in Section 3 works reliably, indicating that out-of-order execution generally occurs and instructions past illegal memory accesses are also performed.
Edit: Updated things.

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 8:17 pm
by Alefroth
Windows 10 already being automatically updated.

https://www.theverge.com/2018/1/3/16846 ... ows-10-fix

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 9:04 pm
by Pyperkub
xwraith wrote: Wed Jan 03, 2018 6:32 pm Google has announced their mitigations:

https://support.google.com/faqs/answer/7622138
https://googleprojectzero.blogspot.com/ ... -side.html

These seem to be the CVEs associated with the issues (nothing there yet, but I imagine in the next 24 hours the information will be there) I'll speculate now that Variant 3 is what caught my eye this morning.

Edit: Added CVEs, and link to Project Zero, updated what CVEs mean, and who it appears to affect.
Per Meltdown/Spectre and the Project Zero link above, it's not limited to Intel. AMD and ARM/Qualcomm also impacted. Ow, Ow, Ow...

Re: Intel CPU bug

Posted: Wed Jan 03, 2018 10:22 pm
by xwraith
Yeah all share variant 1 & 2 (specter). Variant 2 & 3 (meltdown) appears to be intel only though at this point

Variant 3 (Meltdown) is currently intel only

Edit: Fixed

Re: Intel CPU bug

Posted: Thu Jan 04, 2018 12:29 pm
by LawBeefaroni
Of course, this:


Intel CEO Brian Krzanich sold off a large portion of his stake in the company months after Google had informed the chipmaker of a significant security vulnerability in its flagship PC processors - but before the problem was publicly known.


...
The stock sale raised eyebrows when it was disclosed, primarily because it left Krzanich with just 250,000 shares of Intel stock - the minimum the company requires him to hold under his employment agreement.

...

Intel says the sale was preplanned - but that plan was put in place months after it learned of the chip vulnerability
In the statement, the Intel representative said Krzanich's sale had nothing to do with the newly disclosed chip vulnerability and was done as part of a standard stock-sale plan.
...
But Krzanich put that plan in place only October 30, according to the filing. His decision to set up that plan was "unrelated" to information about the security vulnerability, the representative said.

Still, the timeline raises questions: Krzanich's plan was created October 30, and the company learned of the chip vulnerability in June.
Hilarious.

Re: Intel CPU bug

Posted: Thu Jan 04, 2018 2:45 pm
by xwraith
The cool think about Linux is you can see things as they are getting done, and it kinda gives you insight into what the fixes are going to be.

For example this code landed to help mitigate variant 2 for intel processors:

https://lkml.org/lkml/2018/1/4/615

Re: Intel CPU bug

Posted: Thu Jan 04, 2018 3:08 pm
by xwraith
Also if you are running Windows, Microsoft released a powershell script that will tell you if you are vulnerable and if the fixes have been applied:

Code: Select all

Install-Module SpeculationControl
Import-Module SpeculationControl
Get-SpeculationControlSettings
My output currently on an I7 2600K:
Spoiler:
Speculation control settings for CVE-2017-5715 [branch target injection]

Hardware support for branch target injection mitigation is present: False
Windows OS support for branch target injection mitigation is present: False
Windows OS support for branch target injection mitigation is enabled: False

Speculation control settings for CVE-2017-5754 [rogue data cache load]

Hardware requires kernel VA shadowing: True
Windows OS support for kernel VA shadow is present: False
Windows OS support for kernel VA shadow is enabled: False

Suggested actions

* Install BIOS/firmware update provided by your device OEM that enables hardware support for the branch target injection mitigation.
* Install the latest available updates for Windows with support for speculation control mitigations.
* Follow the guidance for enabling Windows support for speculation control mitigations are described in https://support.microsoft.com/help/4072698


BTIHardwarePresent : False
BTIWindowsSupportPresent : False
BTIWindowsSupportEnabled : False
BTIDisabledBySystemPolicy : False
BTIDisabledByNoHardwareSupport : False
KVAShadowRequired : True
KVAShadowWindowsSupportPresent : False
KVAShadowWindowsSupportEnabled : False
KVAShadowPcidEnabled : False

Re: Intel CPU bug

Posted: Thu Jan 04, 2018 5:50 pm
by Biyobi
Ran a BIOS update for my computer last night and received a Win10 update this morning (wasn't found by its normal self-check, but found it when I ran Update manually). Running that powershell script resulted in safe "true" values in everything, but in the bottom subcategories I get:

BTIDisabledBySystemPolicy : False
BTIDisabledByNoHardwareSupport : False

I understand the second one is hardware related: my new 8700k has support built-in to it. I still need to look into why the patches don't block the first by default.

Re: Intel CPU bug

Posted: Fri Jan 05, 2018 3:19 pm
by Rumpy
If anything, this gives me more of an incentive to upgrade as I'm quite a bit behind, with an Intel i5 3.3ghz, on a 32-bit version of Windows. At the time of my last upgrade, there wasn't all that much of a reason to move to 64-bit as there was nothing that really required; it was seen more as an option, but now it's implicit, and slowly but surely more and more things are offered only as 64-bit.

Re: Intel CPU bug

Posted: Fri Jan 05, 2018 6:31 pm
by xwraith
Here is an interesting document on what Red Hat is doing to mitigate

Re: Intel CPU bug

Posted: Sun Jan 07, 2018 6:39 pm
by hitbyambulance
https://arstechnica.com/gadgets/2018/01 ... -about-it/

good update on what Intel's, AMD's, ARM's, Microsoft's, Apple's, Amazon's and Google's responses (and some web browsers) have been so far.

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 1:25 am
by Blackhawk
I can't for the life of my figure out why I'm not getting the Win10 update that fixes this. My last installed update shows 12/17/2017, and 'Check for Updates' shows that I'm up to date.

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 8:40 am
by Carpet_pissr
Have you rebooted lately?

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 12:58 pm
by Victoria Raverna
Blackhawk wrote: Mon Jan 08, 2018 1:25 am I can't for the life of my figure out why I'm not getting the Win10 update that fixes this. My last installed update shows 12/17/2017, and 'Check for Updates' shows that I'm up to date.
Which antivirus do you run on your PC?

From https://support.microsoft.com/en-us/hel ... s-software

To help prevent stop errors that are caused by incompatible antivirus applications, Microsoft is only offering the Windows security updates that were released on January 3, 2018, to devices that are running antivirus software that is from partners who have confirmed that their software is compatible with the January 2018 Windows operating system security update.

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 1:36 pm
by Blackhawk
I'd already seen that. Windows Defender on the PCs in question, so it isn't that.

It also poisons the search, such that I can't find answers to the problem that don't refer to that issue.

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 1:55 pm
by LawBeefaroni
Flashback to WinXP. Have been installing update, it's at 10% and has been going for 35 minutes.

This is a big one.

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 6:59 pm
by xwraith
Blackhawk wrote: Mon Jan 08, 2018 1:36 pm I'd already seen that. Windows Defender on the PCs in question, so it isn't that.

It also poisons the search, such that I can't find answers to the problem that don't refer to that issue.
Did you run the powershell script that checks the per-requisites?

Re: Intel CPU bug

Posted: Mon Jan 08, 2018 8:06 pm
by Blackhawk
I ran a powershell script that was supposed to tell you if you still have the vulnerability, but I had no idea how to read the results beyond the site's instruction that 'false means still vulnerable.'

Re: Intel CPU bug

Posted: Tue Jan 09, 2018 1:35 pm
by xwraith
Blackhawk wrote: Mon Jan 08, 2018 8:06 pm I ran a powershell script that was supposed to tell you if you still have the vulnerability, but I had no idea how to read the results beyond the site's instruction that 'false means still vulnerable.'
I think what you need to look at is the "Hardware support for branch target injection mitigation is present" flag, and I think that is delivered via a bios patch for older platforms (assuming you are running Intel)

IIRC the patch will block until the hardware reqs are present, and then it will apply.

Since I'm running a 5+ year old motherboard I'm thinking I'm never going to get patched.

Edit:
Of course now that I wrote this I just saw this, which has a nice table that lays everything out. Spectre variant 2 is what requires a microcode update.

Also it looks like they update theirclient guidance article yesterday

Re: Intel CPU bug

Posted: Tue Jan 09, 2018 1:38 pm
by Blackhawk
That's about how old my newest motherboard is. I doubt I have more than one or two components in the entire house that is still supported by the manufacturer. If it takes a manufacturer's update to be safe, I'm screwed.

Re: Intel CPU bug

Posted: Tue Jan 09, 2018 7:02 pm
by stessier
LawBeefaroni wrote: Mon Jan 08, 2018 1:55 pm Flashback to WinXP. Have been installing update, it's at 10% and has been going for 35 minutes.

This is a big one.
I'm running Win10 and waited until it said the update was ready. I hit the restart button and was done in under 2 minutes. I'm using an SSD drive, so maybe that helped? Quite painless.

Re: Intel CPU bug

Posted: Tue Jan 09, 2018 7:24 pm
by stessier
I'm trying to confirm I got the patch. My powershell says I can't run the import-module because of the execution policy. Is it safe to set the execution policy to bypass? Is there a safer way?

Re: Intel CPU bug

Posted: Tue Jan 09, 2018 11:29 pm
by xwraith
stessier wrote: Tue Jan 09, 2018 7:24 pm I'm trying to confirm I got the patch. My powershell says I can't run the import-module because of the execution policy. Is it safe to set the execution policy to bypass? Is there a safer way?
I believe it just requires RemoteSigned. The client guidance article link has a little wrapper script that set your security setting, imports the module, runs it and then reverts it.