Messages in this thread | | | Date | Fri, 23 Nov 2018 00:17:32 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [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
| |