linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Jiri Kosina <jkosina@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ben Hutchings <ben@decadent.org.uk>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] cpu/speculation: Warn on unsupported mitigations= parameter
Date: Thu, 16 May 2019 12:43:12 -0500	[thread overview]
Message-ID: <20190516174312.f3ipwv4io4tnulnn@treble> (raw)
In-Reply-To: <20190516070935.22546-1-geert@linux-m68k.org>

On Thu, May 16, 2019 at 09:09:35AM +0200, Geert Uytterhoeven wrote:
> 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")
> Cc: stable@vger.kernel.org
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  kernel/cpu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index f2ef10460698e9ec..8458fda00e6ddb88 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;
>  }
> -- 
> 2.17.1
> 

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  parent reply	other threads:[~2019-05-16 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16  7:09 [PATCH] cpu/speculation: Warn on unsupported mitigations= parameter Geert Uytterhoeven
2019-05-16  7:48 ` Jiri Kosina
2019-05-16  8:16   ` Ingo Molnar
2019-05-16 17:43 ` Josh Poimboeuf [this message]
2019-06-26 15:16 ` [tip:smp/urgent] " tip-bot for Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190516174312.f3ipwv4io4tnulnn@treble \
    --to=jpoimboe@redhat.com \
    --cc=ben@decadent.org.uk \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).