[lkml]   [2019]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] x86/speculation: Add document to describe Spectre and its mitigations
On 12/31/18 8:22 AM, Ben Greear wrote:
> On 12/21/2018 05:17 PM, Tim Chen wrote:
>> If you don't worry about security and performance is paramount, then
>> boot with "nospectre_v2".  That's explained in the document.
> There seem to be lots of different variants of this type of problem.  It was not clear
> to me that just doing nospectre_v2 would be sufficient to get back full performance.

The performance penalty comes from retpoline penalizing indirect branch predictions in kernel.
With nospectre_v2, retpoline is disabled so you should get all the performance
back from spectre mitigation.

This does not disable kernel page table isolation for meltdown mitigation, which also
needs to be turned off if you want to get the full performance back. That's somewhat
beyond the scope of this doc on Spectre.

> And anyway, I would like to compile the kernel to not need that command-line option,
> so I am still interesting in what compile options need to be set to what values...

If you just want to disable spectre mitigation, setting CONFIG_RETPOLINE=n should do
the trick. If you also want to disable meltdown mitigation,



 \ /
  Last update: 2019-01-07 18:58    [W:0.162 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site