lkml.org 
[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode
On Thu, 22 Nov 2018, Ingo Molnar wrote:
> * Thomas Gleixner <tglx@linutronix.de> wrote:
> > +static void update_stibp_msr(void *info)
> > {
> > - /* Enhanced IBRS makes using STIBP unnecessary. */
> > - if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
> > - return false;
> > -
> > - /* Check for strict app2app mitigation mode */
> > - return spectre_v2_app2app == SPECTRE_V2_APP2APP_STRICT;
> > + wrmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
> > }
>
>
> Does Sparse or other tooling warn about unused function parameters? If
> yes then it might make sense to mark it __used?

That would be __useless :)

> So I'm wondering, shouldn't firmware_restrict_branch_speculation_start()/_end()
> also enable/disable STIBP? It already enabled/disables IBRS.

IBRS includes STIBP. We don't use IBRS in the kernel otherwise because
you'd have to do more MSR writes on the protection boundaries.

We only use ENHANCED IBRS if it's available, which also makes STIBP
redundant.

Thanks,

tglx

\
 
 \ /
  Last update: 2018-11-23 00:18    [W:0.129 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site