[PATCH] x86/speculation: Clean up various Spectre related details
From: Ingo Molnar
Date: Sun Feb 11 2018 - 13:51:16 EST
* David Woodhouse <dwmw@xxxxxxxxxxxx> wrote:
> + /*
> + * Retpoline means the kernel is safe because it has no indirect
> + * branches. But firmware isn't, so use IBRS to protect that.
> + */
> + if (boot_cpu_has(X86_FEATURE_IBRS)) {
> + setup_force_cpu_cap(X86_FEATURE_USE_IBRS_FW);
> + pr_info("Enabling Restricted Speculation for firmware calls\n");
> + }
I have changed this text to say:
pr_info("Spectre mitigation: Restricting branch speculation (enabling IBRS) for firmware calls\n");
In fact while at it I found and improved a few other details as well, such as:
* Retpoline means the kernel is safe because it has no indirect
- * branches. But firmware isn't, so use IBRS to protect that.
+ * branches. But we don't know whether the firmware is safe, so
+ * use IBRS to protect against that:
most Spectre related messages are now harmonized:
arch/x86/kernel/cpu/bugs.c: pr_info("Spectre mitigation: Filling RSB on context switch\n");
arch/x86/kernel/cpu/bugs.c: pr_info("Spectre mitigation: Enabling Indirect Branch Prediction Barrier (IBPB)\n");
arch/x86/kernel/cpu/bugs.c: pr_info("Spectre mitigation: Restricting branch speculation (enabling IBRS) for firmware calls\n");
Find the full patch below.
Thanks,
Ingo
=========================>