Commit a75e0cb6 authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Khalid Elmously

UBUNTU: SAUCE: Clarify IBRS/IBPB runtime state change messages

BugLink: https://bugs.launchpad.net/bugs/1830176

The Ubuntu kernel contains runtime controls to enable/disable IBRS and IBPB
which emit messages on state changes. In 4.4.180 upstream added Spectre v2
user space mitigation which also emits a message. Modify the Ubuntu-only
messages to differentiate them from the regular upstream message.
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 6524e154
......@@ -223,9 +223,9 @@ int set_ibpb_enabled(unsigned int val)
if (boot_cpu_has(X86_FEATURE_USE_IBPB)) {
ibpb_enabled = val;
if (ibpb_enabled != prev)
pr_info("Spectre V2 : Spectre v2 mitigation: %s "
pr_info("Spectre V2 : mitigation: %s "
"Indirect Branch Prediction Barrier\n",
ibpb_enabled ? "Enabling" : "Disabling");
ibpb_enabled ? "Enabling kernel" : "Disabling kernel");
} else {
ibpb_enabled = 0;
if (val) {
......@@ -272,10 +272,10 @@ int set_ibrs_enabled(unsigned int val)
if (boot_cpu_has(X86_FEATURE_USE_IBRS_FW)) {
ibrs_enabled = val;
if (ibrs_enabled != prev)
pr_info("Spectre V2 : Spectre v2 mitigation: %s "
"Indirect Branch Restricted Speculation%s\n",
ibrs_enabled ? "Enabling" : "Disabling",
ibrs_enabled == 2 ? " (user space)" : "");
pr_info("Spectre V2 : mitigation: %s "
"Indirect Branch Restricted Speculation\n",
ibrs_enabled == 2 ? "Enabling kernel+user" :
ibrs_enabled ? "Enabling kernel" : "Disabling");
if (ibrs_enabled == 0) {
/* Always disable IBRS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment