[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1bf72720281770162c87990697eae1ba2f1d917a@git.kernel.org>
Date: Wed, 26 Jun 2019 08:16:06 -0700
From: tip-bot for Geert Uytterhoeven <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, peterz@...radead.org, ben@...adent.org.uk,
hpa@...or.com, jpoimboe@...hat.com, tglx@...utronix.de,
gregkh@...uxfoundation.org, geert@...ux-m68k.org, jkosina@...e.cz,
linux-kernel@...r.kernel.org
Subject: [tip:smp/urgent] cpu/speculation: Warn on unsupported mitigations=
parameter
Commit-ID: 1bf72720281770162c87990697eae1ba2f1d917a
Gitweb: https://git.kernel.org/tip/1bf72720281770162c87990697eae1ba2f1d917a
Author: Geert Uytterhoeven <geert@...ux-m68k.org>
AuthorDate: Thu, 16 May 2019 09:09:35 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 26 Jun 2019 16:56:21 +0200
cpu/speculation: Warn on unsupported mitigations= parameter
Currently, if the user specifies an unsupported mitigation strategy on the
kernel command line, it will be ignored silently. The code will fall back
to the default strategy, possibly leaving the system more vulnerable than
expected.
This may happen due to e.g. a simple typo, or, for a stable kernel release,
because not all mitigation strategies have been backported.
Inform the user by printing a message.
Fixes: 98af8452945c5565 ("cpu/speculation: Add 'mitigations=' cmdline option")
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Jiri Kosina <jkosina@...e.cz>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Ben Hutchings <ben@...adent.org.uk>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20190516070935.22546-1-geert@linux-m68k.org
---
kernel/cpu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 077fde6fb953..551db494f153 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2339,6 +2339,9 @@ static int __init mitigations_parse_cmdline(char *arg)
cpu_mitigations = CPU_MITIGATIONS_AUTO;
else if (!strcmp(arg, "auto,nosmt"))
cpu_mitigations = CPU_MITIGATIONS_AUTO_NOSMT;
+ else
+ pr_crit("Unsupported mitigations=%s, system may still be vulnerable\n",
+ arg);
return 0;
}
Powered by blists - more mailing lists