Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3054634ybi; Tue, 2 Jul 2019 01:14:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhYvD7FNgJoSAt17ZCF5Y94Y1+iBm998IjaJNQX8hne/nutbawmWe5eV57i3+07QW74pvg X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr33049926plb.24.1562055265904; Tue, 02 Jul 2019 01:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562055265; cv=none; d=google.com; s=arc-20160816; b=BBPnciyHF70ytUPJ82va1d0+tMT9wwemT+BaYzgI5w5guIQoMj/LZ1q6+boea+/MsK hqR8I+rbiI2wAiHUPwV/ezqke1muZX1e67Gi1X7hWh1jcQTGF3a4gmH0cEUQfQs+ZrhY DZKoiP6jH4w0uNYLRhDsGcu14H7qfH+CwFJ+DAjcU+H9mZCJJZu3DJrt+a4OsCoYhwxU ydJMQ/Zg4Q54hj+b0t8elq1HgUc2r7igCZxzZ66pjAJQz03jI642bFRXxRk+AoRZOZ5k GI+qfC/RhRi+YVAKzdDm9AETCz8jg1Fuh16rBSLIf/AtkNUjI6m70V65hTkewIb3iyAM PmAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X1PjTg6TSpQAW3YgJbOwLohSBridZcWkcO7O5g/RcNA=; b=kSu5SNRVtd5TQHgbKUOcDajQ5BQZ4szmFJD7mfKiKUAJ2D/yTUAr3loEbHkHKGUYz4 4SwEm9cfV9grF5AvfBfefj+khhLCCj61UQn6xvqbzf3TaDXoNw9npF+TR/gVjtdfszPe lainhmd4pdJZ5Og9S/K6tYUSA1ktYtOwOQ1+ztNgXZIwAhVDoyZmJgphAMIVHEbWXIjL 364ZFtwZc9lQ3k8CEl1jc0zV3kTai644SwGJoOeJ1D8bpegU/vMQa8WD0ayDUIEaGO48 gZcJ8Gtvs7qGnqX+BpmTtKrjOhdH8GPXoM8NfHkz73tHMlGAiT1CKeb7J02ktPyX1qEH zmww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S+moHf9Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78si11826084pga.411.2019.07.02.01.14.11; Tue, 02 Jul 2019 01:14:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S+moHf9Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728211AbfGBIHK (ORCPT + 99 others); Tue, 2 Jul 2019 04:07:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:54204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728195AbfGBIHH (ORCPT ); Tue, 2 Jul 2019 04:07:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 054082184E; Tue, 2 Jul 2019 08:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562054826; bh=vxlSxloGy9FiBx6D4K/fVsTHST9rZqG0BZe4InvsPp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S+moHf9QWVNBp2ZtqwJt8oVrj1dbrWa/AxhoscTw++Tkx7DPk2ThQHU6BMXwe2lCU r+YRJN4gOp8RX3Ze76mDFxcqyOKojLs8R3AAEAvVw8GNnKxX2bqSAzSUdRmHyp+rpf U6GxdRN6X5166f5qmDUya2cXYDIoRBKTa/WXD6ow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Thomas Gleixner , Josh Poimboeuf , Peter Zijlstra , Jiri Kosina , Ben Hutchings Subject: [PATCH 4.19 46/72] cpu/speculation: Warn on unsupported mitigations= parameter Date: Tue, 2 Jul 2019 10:01:47 +0200 Message-Id: <20190702080126.998230881@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190702080124.564652899@linuxfoundation.org> References: <20190702080124.564652899@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven commit 1bf72720281770162c87990697eae1ba2f1d917a upstream. 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 Signed-off-by: Thomas Gleixner Acked-by: Josh Poimboeuf Cc: Peter Zijlstra Cc: Jiri Kosina Cc: Greg Kroah-Hartman Cc: Ben Hutchings Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190516070935.22546-1-geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman --- kernel/cpu.c | 3 +++ 1 file changed, 3 insertions(+) --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2289,6 +2289,9 @@ static int __init mitigations_parse_cmdl 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; }