Received: by 10.223.176.5 with SMTP id f5csp2850214wra; Mon, 5 Feb 2018 10:56:20 -0800 (PST) X-Google-Smtp-Source: AH8x225EIXo6HSlo/tUk3qkrWRmft4s2rVrCoT19oVNRUi1O/OMn9Enqf+3KCSld+Jz2sIPjaFH5 X-Received: by 2002:a17:902:b2c2:: with SMTP id x2-v6mr14662892plw.414.1517856980168; Mon, 05 Feb 2018 10:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517856980; cv=none; d=google.com; s=arc-20160816; b=rHs91rI0dReKzP/k1YMUShpYwOxCemQcMnBJ5LHl9hZGm1Clw2VPMokjxfO/RLfFSv EMWkDQt6EnTBCgqDhI2Vht6EKEEIcOkBSA+YII2WFw+5nWgDAMPEdqPxyn1BITT63+l7 zWdF77ezRgS/74SOMwQzpWEbav0fY73NdxU24NnOTi8ZXhahkuxickZiNsXogXMnUYBA k4/vXy/lv8tooawX5Pqbmgmu+YyF1PL3JjzDN2eUkkU6KcoqbBZfdxUYXXp3cen6etqO FbPL7aw0tWLDcFHK+byUCvPXmSt0BBeEtT8iG4Szyx0v3fOyl5gSvuOsqslcVxJIG1Fz QNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=dbri5otLoN88FgTn87i/Gg8OlzlWnCIPS6LAVqHvqY4=; b=Xia6fsWkJHzROlW6xLqdCJn1nSmun9fgQ4SN2DtF2g1BLYKlypMSVY+8F9noCt0lsJ 3dB82xu6tnYrUQ2cVHzniWspCyDu1KRgnIqIRmqOjbzneRnqkNuovv4u41hlTwPB7WlO ttZSg0ajrSFs0a7wJQg4v/nIOb1DKaZ7Bi05es6Ogcuq+yREaNodOz/I3MoaCFmsAiY/ sZHb4DWQwGx/Wfl6vb2WO3MozNSKb1q48elJIjKx7QMSVMctBnGljlALevg2Zz4swhMS z+lPXG6EGnhK+6VW/C+6o8zPe9HrUQ0kyfv4RP93FVMN7Fibl13UaHVcuP6MVk4bOF0L EmTw== ARC-Authentication-Results: i=1; mx.google.com; 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 v85si1156390pfk.57.2018.02.05.10.56.05; Mon, 05 Feb 2018 10:56:20 -0800 (PST) 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; 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 S1753363AbeBESzl (ORCPT + 99 others); Mon, 5 Feb 2018 13:55:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52438 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753726AbeBESZT (ORCPT ); Mon, 5 Feb 2018 13:25:19 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2EB7510FB; Mon, 5 Feb 2018 18:25:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dou Liyang , Thomas Gleixner , ak@linux.intel.com, peterz@infradead.org, Tomohiro , dave.hansen@intel.com, bp@alien8.de, arjan@linux.intel.com, dwmw@amazon.co.uk Subject: [PATCH 4.15 28/60] x86/spectre: Check CONFIG_RETPOLINE in command line parser Date: Mon, 5 Feb 2018 10:23:01 -0800 Message-Id: <20180205182215.096951832@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182213.902626065@linuxfoundation.org> References: <20180205182213.902626065@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dou Liyang douly.fnst@cn.fujitsu.com commit 9471eee9186a46893726e22ebb54cade3f9bc043 The spectre_v2 option 'auto' does not check whether CONFIG_RETPOLINE is enabled. As a consequence it fails to emit the appropriate warning and sets feature flags which have no effect at all. Add the missing IS_ENABLED() check. Fixes: da285121560e ("x86/spectre: Add boot time option to select Spectre v2 mitigation") Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: ak@linux.intel.com Cc: peterz@infradead.org Cc: Tomohiro Cc: dave.hansen@intel.com Cc: bp@alien8.de Cc: arjan@linux.intel.com Cc: dwmw@amazon.co.uk Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/f5892721-7528-3647-08fb-f8d10e65ad87@cn.fujitsu.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -213,10 +213,10 @@ static void __init spectre_v2_select_mit return; case SPECTRE_V2_CMD_FORCE: - /* FALLTRHU */ case SPECTRE_V2_CMD_AUTO: - goto retpoline_auto; - + if (IS_ENABLED(CONFIG_RETPOLINE)) + goto retpoline_auto; + break; case SPECTRE_V2_CMD_RETPOLINE_AMD: if (IS_ENABLED(CONFIG_RETPOLINE)) goto retpoline_amd;