Received: by 10.223.176.5 with SMTP id f5csp2861363wra; Mon, 5 Feb 2018 11:07:17 -0800 (PST) X-Google-Smtp-Source: AH8x226FeM1IXoFNtRx1TORyXj4Eu0k3Rl0hJvWZfjXE1qta0AY08DKdKaWUOnHP6pYcWcPyPuRG X-Received: by 10.99.185.2 with SMTP id z2mr34207529pge.299.1517857636913; Mon, 05 Feb 2018 11:07:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517857636; cv=none; d=google.com; s=arc-20160816; b=EQGcTU35L2d+bvUi2WlkVh9SBXmPyXmgt16DsaVumxufoc417u2pETVpr9jgTwTruP rUDkbyEYyS54N/FIlMh/xwG8nLp2/Hb8LafOMiJEwDG7v5znBi/rZsqScqKcrPXojiWf N8xHkG7A1bn150mwG9vRB+XXrPpHHyn//RcE4UyZpuGrjls4VdDvlSOdLamMpGTx9WdE lT1QrqN3q/MMceRvOPxAfcpMzpvdhl2My8IMKBmT8QFRh3ckhU5tRqZZ/jD35dbti/4O 51qjHSHteUCj5FcqTuScRVijUNHds+7i0Uh0UdpbmLB5Vhcfc/IRlw/lJT50kWZHoTJd yK1g== 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=0ySoIrfeqZTMrsWQDhJEcktrv+xRHxriDsiQxYrkZs0=; b=oyZwZW33a1gi8QFZRji8CiTHGYfop9aiTXzA483Sec0/SpZhPYysy6WfTyFFNrXsfK O1vndAfvKKCAyIqEhWXcam6PJRv6zzMxkMiriTe9s/NCqqnRa2IM3jSrhVTlq46Pykn2 PkFeJy8ZSaoC7+81N9ii6LU0b1H39NBEcvv89AZYRewt9LeFUdq0cynkMwb8ntLc8D9T w0L+XWE4brBri2Um61yhBkvCwSDHmq8HPG4NSb+jRJ+4v1pvJB/rmB/wsJu3toBF72Ji QkLsdoph/UTIXxLlnmvR65TfnZq/x/5ZNzET1U3Bgvo97Woc87CnwiFVQz6ww67Y212m TsNA== 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 f3si2732588pfd.65.2018.02.05.11.07.02; Mon, 05 Feb 2018 11:07:16 -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 S1753726AbeBETGI (ORCPT + 99 others); Mon, 5 Feb 2018 14:06:08 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51268 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753477AbeBESX6 (ORCPT ); Mon, 5 Feb 2018 13:23:58 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0C57EFD0; Mon, 5 Feb 2018 18:23:54 +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.14 32/64] x86/spectre: Check CONFIG_RETPOLINE in command line parser Date: Mon, 5 Feb 2018 10:22:51 -0800 Message-Id: <20180205182139.902983726@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182138.571333346@linuxfoundation.org> References: <20180205182138.571333346@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dou Liyang 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;