Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp786478pxp; Fri, 11 Mar 2022 15:06:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXPh96hjFg04CsEkgmScAZr0gmRAtwc8M+LuLHbbo4LJsg7D385fwHdJZqaswcl0pUGIXP X-Received: by 2002:a05:6a00:13a9:b0:4f7:976d:fc9f with SMTP id t41-20020a056a0013a900b004f7976dfc9fmr3704222pfg.33.1647039993763; Fri, 11 Mar 2022 15:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647039993; cv=none; d=google.com; s=arc-20160816; b=EhcFMRjI/4bnp3Mea2PuGtVEMlcWNEs4TpDUtjCUeynnNuhz0Va7aTuvYEef7MRST7 lca4GoS4HCGY6Il518y7eXMo168DshqC99Mqm8S3JoXeRAoNl8eE6LuIIfn6AbHUUL2M G9RwryukYF3zYK59WSffwyNIEF3D5beEFkz/i7qoOJdpOo04QRB6JxnWPblyLkWzBfG4 SoVnBvVKrOZKjmej9yEom0iz1Dka9B9wdPZq5CGLyxQ2t06ugiJ3DhYjuEj2NoHeEKpz +Buv8iAU7/rXHQTGXsiK9UEM9m8QNqs/wHCO+hELMGNAB/OZOw/l1n7n5ZS9iwY6CzUC Uz2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kxa2iqtLo6+dVSvFqyX4Of6CSlfSlfxvKZ/MaTp+byw=; b=N7GtdqvJcGLEZSo7Oi2eyQQtXDQrD0u6xHFWk1WOvL69tVXpKtpoyvLA6ihhYOOzfB l/08dJPyaIcU+NtaRrEP/OFnXTD52prfULcv0t8fyNzhv0JZCMnwmE6yNoxa/+6FSBKo QRbw7rs6fKkhFXcKT/oYXK2xzInK0FGmdfJAy+AORJmiJlIu/MdiU5Nx/HzxbqzjmNFi 7aI+EaTlvG4o9S28EGr72iBUxHrLJ6/GA4nwdKt2vse3Ehk7WKJSxQE6XHLkIX5lJmB1 grvtqDg5y1AVodEnSJ3yaaZGWoZ6UD5fXLgCFDpExFqpOiA1Y0c3Xs8BPgSvDBOoet+Z JW6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0zHTI+Ab; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i189-20020a6387c6000000b0037ffd5c84f4si9116539pge.479.2022.03.11.15.06.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:06:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0zHTI+Ab; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5CCA32036DC; Fri, 11 Mar 2022 14:02:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243641AbiCJO0q (ORCPT + 99 others); Thu, 10 Mar 2022 09:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243430AbiCJOWB (ORCPT ); Thu, 10 Mar 2022 09:22:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450DFB91D3; Thu, 10 Mar 2022 06:20:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C898561CEE; Thu, 10 Mar 2022 14:20:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4B4AC340E8; Thu, 10 Mar 2022 14:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646922045; bh=hqtcupg/S7vlWPIHEZ3+ea8d0QaSg8jJW+0Mknfouuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0zHTI+Ab6mTNQ5eY6g+XQ3k+Nk2EFgAlADBY+Liip4Y3+nKkMWd3JwWV/c5ebaWny 4Q13qUDRkZ/Ledrg/lSBKGL+Cmm1UTRg/UsHjIJWB9xTOQQrYE1GUfQGQBj0VcJcGO EUmCPP2gNmKIU6M0UptSSWvkrT2L9+J3GQ1lNHJw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Alexei Starovoitov , Frank van der Linden Subject: [PATCH 4.14 02/31] x86,bugs: Unconditionally allow spectre_v2=retpoline,amd Date: Thu, 10 Mar 2022 15:18:15 +0100 Message-Id: <20220310140807.600031247@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140807.524313448@linuxfoundation.org> References: <20220310140807.524313448@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra commit f8a66d608a3e471e1202778c2a36cbdc96bae73b upstream. Currently Linux prevents usage of retpoline,amd on !AMD hardware, this is unfriendly and gets in the way of testing. Remove this restriction. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Borislav Petkov Acked-by: Josh Poimboeuf Tested-by: Alexei Starovoitov Link: https://lore.kernel.org/r/20211026120310.487348118@infradead.org [fllinden@amazon.com: backported to 4.14 (no Hygon in 4.14)] Signed-off-by: Frank van der Linden Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 6 ------ 1 file changed, 6 deletions(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -839,12 +839,6 @@ static enum spectre_v2_mitigation_cmd __ return SPECTRE_V2_CMD_AUTO; } - if (cmd == SPECTRE_V2_CMD_RETPOLINE_AMD && - boot_cpu_data.x86_vendor != X86_VENDOR_AMD) { - pr_err("retpoline,amd selected but CPU is not AMD. Switching to AUTO select\n"); - return SPECTRE_V2_CMD_AUTO; - } - spec_v2_print_cond(mitigation_options[i].option, mitigation_options[i].secure); return cmd;