Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp585530pxp; Wed, 9 Mar 2022 08:37:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTfpsn8EUCbXgB12BrK+EHlHWIbi/vEf7EMxBMbXLpywv6HQfF3ekWCbCOkG6k1tOsToQr X-Received: by 2002:a17:907:1687:b0:6b5:a9f7:4eca with SMTP id hc7-20020a170907168700b006b5a9f74ecamr539622ejc.535.1646843821225; Wed, 09 Mar 2022 08:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646843821; cv=none; d=google.com; s=arc-20160816; b=af7CMxX2F3H9yxlS89WaDmZLv3qNkKkihe1ZNXAVzNfZMsIZ8hTA6FJ4vdG/FRCWF6 MWP8Izxq1ICQXgulbA4AK9jCiwnG6VanAVzP0p1NpFOW8eJlfmJnkYbYUVYdpoLxZpRB k/SErxPVFka6cX8X1Ei7V/4cpn96IW0GJ5uH38TF7hbZAjuwR4tGO3y0+8MTf9OVK3oj x08MttlEfbc4Lp3IldxY60dZgMU/zcurWwFy6qeanz2U1nHkGPpnRLC3o1kh7UKejhxi 8c3wg+rZmo5AP5XugchWNuYffYs/TacKPl4dMx21s07t24LpCQjCHS+T4LOBUmqlbtcB oeTQ== 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=0X4xNszKowYAK+VuyxEAhSRxmt7J5zzfoqcztm5b7Ys=; b=docUUitVJzw3e17pDTAHUhJ995gc44lIAOpRvkeZ+rtDaHJZDv2jvNoq6Cr1gL4wlH AGMCML4BC0M3XwNrYUgVqVSoedeUDHv63uc5Hk4574DKyWLJjHvf0EbRlQm2lemO2cMz /EzvTMQ9vuofau31XTbjdzkkF9Q6iim99NzTSTK745FeBjjaf0CAe1j8+sbQSMw5rVlI YHFSpQady0fdUgICxi6DNRp8SZ9+9IFYq0pgL2g/TcAV4UAaMRU2euV2DfEt81fx6H+q 2X177QPxR1sOMWffXr2gtFPccq6BOFo4DP6RhSdC0hpmKTCGocW2oKxd5xhw3xUUtBvY Z63g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BbpfvFho; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a17090674c400b006b910421fa3si1482781ejl.372.2022.03.09.08.36.36; Wed, 09 Mar 2022 08:37:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BbpfvFho; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232638AbiCIQRj (ORCPT + 99 others); Wed, 9 Mar 2022 11:17:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234995AbiCIQIU (ORCPT ); Wed, 9 Mar 2022 11:08:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84F1F186471; Wed, 9 Mar 2022 08:04:58 -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 ams.source.kernel.org (Postfix) with ESMTPS id 00063B82231; Wed, 9 Mar 2022 16:04:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E354C340E8; Wed, 9 Mar 2022 16:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646841857; bh=gatLyyLi4/uk4jBszPH9iqAzyHrO/4OkvoeFYT6BEfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BbpfvFhoWfISBgcmQF087A5jloGult0s8CnfeRsWTt5vKMxy/5mAe6Y6m+b58v9nT RPiQUlEP9K0ZKrjuGcTFoUUKRy4X3EVSiUFBU4XB6st/B4MHz5Jxc+XziNziQWWAVA 3eJXDTMYy0de0AwGtq66pAWSn4yoEel3jtdvmiSg= 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 Subject: [PATCH 5.4 02/18] x86,bugs: Unconditionally allow spectre_v2=retpoline,amd Date: Wed, 9 Mar 2022 16:59:51 +0100 Message-Id: <20220309155856.625474606@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309155856.552503355@linuxfoundation.org> References: <20220309155856.552503355@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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 7 ------- 1 file changed, 7 deletions(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -839,13 +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_HYGON && - 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;