Microsoft introduces drastic performance fix for Spectre variant

Greg S

Posts: 1,607   +442
Something to look forward to: Spectre has caused its share of problems, but performance fixes are on the way to Windows 10 users. A clever control flow technique developed by Google and then adapted to the Windows kernel by Microsoft is intended to drastically speed up processes that rely on speculative execution without compromising security.

After fixes were introduced for several variants of the Spectre speculative execution exploit, performance took a nose dive. Microsoft and many other industry giants have been working to patch security flaws for over a year now, but most fixes have degraded performance. Borrowing ideas from Google, Microsoft has now pushed out "retpoline for Windows" to improve CPU performance.

Retpoline is a portmanteau of return and trampoline. Instead of guessing where a program will jump to next during its execution, an indirect method of determining where to go is implemented. When an attacker attempts to scrape information available from speculative executions, the results yield no valuable data because there are too many locations where the desired information could have ended up. For the full technical explanation of this process, Google has details on how preventing branch-target injection works.

Imagine speculative execution as an overly energetic 7-year old that we must now build a warehouse of trampolines around. –Paul Turner, Google Senior Staff Engineer

At runtime, any indirect jumps in software are identified and fixed in memory following a kernel examination. Not all programs can make use of retpoline sequences in every instance, but it is enough to make Spectre effectively useless for malicious users.

The end result of Microsoft's latest performance update shows up to 25 percent improvements in application launch times. Storage throughput has increase 1.5- times in DiskSpd benchmarks, while networking has also seen drastic improvements on Broadwell CPUs.

Currently, retpoline optimizations are only available as part of the Windows Insider Preview builds version 18272 and above, but will be shipping as a standard feature during the first half of this year. It can be enabled or disabled through registry tweaks and checked via a PowerShell command.

Permalink to story.

 
The end result of Microsoft's latest performance update shows up to 25 percent improvements in application launch times. Storage throughput has increase 1.5- times in DiskSpd benchmarks, while networking has also seen drastic improvements on Broadwell CPUs.
Wow! Is this over the initial patch or overall?
 
The end result of Microsoft's latest performance update shows up to 25 percent improvements in application launch times. Storage throughput has increase 1.5- times in DiskSpd benchmarks, while networking has also seen drastic improvements on Broadwell CPUs.
Wow! Is this over the initial patch or overall?

Initial patch. It's a major improvement, but not a ground breaking advancement in terms of overall performance. This is closer to on par with no patches.
 
The end result of Microsoft's latest performance update shows up to 25 percent improvements in application launch times. Storage throughput has increase 1.5- times in DiskSpd benchmarks, while networking has also seen drastic improvements on Broadwell CPUs.
Wow! Is this over the initial patch or overall?
Initial patch of course. Branch prediction was a HUGE performance boost and disabling it was a consequently a big loss. There's no way that randomising the jump locations for the results to overall improve performance - that wouldn't make sense.
 
The end result of Microsoft's latest performance update shows up to 25 percent improvements in application launch times. Storage throughput has increase 1.5- times in DiskSpd benchmarks
Whoa! Those numbers are huge. When the initial security patches came out, no one was talking about the performance loss being anything so severe. I think 10% is the largest number I ever heard and that was worst case for specific scenarios.

So which is true - were they lying back then, or now?
 
Back