[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
Message ID | 169511719062.27769.2510260108122622522.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3360076vqi; Tue, 19 Sep 2023 05:54:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGM9UkZgXrH/JjHF0pWGNN+wXcRMfWmJ0p/qJ52iftvI8YRTAsgXMLty8qZye95CwvzTNpy X-Received: by 2002:a05:6a20:a10e:b0:152:4615:cb9d with SMTP id q14-20020a056a20a10e00b001524615cb9dmr3279729pzk.12.1695128097010; Tue, 19 Sep 2023 05:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695128096; cv=none; d=google.com; s=arc-20160816; b=LXpBJsIHKIwy7VETgatPD12GHOzZoXpBm1q0jYFN3i/qeNSRqlsiLQRi2bV8mmI50B S8D1OG6hZzdhT1rMXnjK4ORogC47ePVjqzbKOE/l6Rk9qx4PLpHmQxcwP5IMGeBMstvc VQ0oRdFSassmMZX5eUgwcEr7Pr1S7tO7RvMiUJJ10ouVHifPq6uNoVaJdFphOkuajjVM p1qZGfsQg7JlB/UZ56ER1vRSdJe66OLfWNNV3F+uhyd1Jauw2BOCPKOyK2LRxWQl4X2y J55Iklk3ROQ6xqG8TNoUsI83l+C+FWL7yMKeBojnsl8ZgiBd+LVosKlQxcFNHpNt6xgp DC3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=SY8oVWk6zlglMI9XbDrnIRIKpD+8JvKtwWhUjnX1BB4=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=pPAyoeEw5MfYYy6l9AE/EDCBIqRNObGu41trxugUve+THMRFL8jLf9xLn47BDr/gTE G/+GDJCdX9bbxCF7qCt4h6aE9ze5TuvAEAGzR+WuWLD5YfvDOIbAg5ifma2JirKpk+g3 OCi++HGRZqBVSrfUz7FAe+49Je6P5DBqw0yH4NRVaU5+9ikn1EPWCkALJ74mttobQSYk fymlqXck4Ip+TBxANDRPCIoe0Os2o+aR83kBiTBRfUnBH2PvgtknDKg1BuyGf7CTK9KW ZLfL2RBft4sXoyQAJzMHlTD5HqIjXpj0XrDg2QO9NxXXHiJh1Ta7Ma0vcf7tb/KAw1UR it2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KnNreuHZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id m11-20020a633f0b000000b0056f7592d736si9562919pga.34.2023.09.19.05.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KnNreuHZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8F3F18108BD5; Tue, 19 Sep 2023 02:54:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbjISJy3 (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Tue, 19 Sep 2023 05:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231484AbjISJxV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 19 Sep 2023 05:53:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E071F0; Tue, 19 Sep 2023 02:53:14 -0700 (PDT) Date: Tue, 19 Sep 2023 09:53:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695117191; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SY8oVWk6zlglMI9XbDrnIRIKpD+8JvKtwWhUjnX1BB4=; b=KnNreuHZUu4SsRdceDdtijn8gSQ1XDCLJNsKefbltF8o6DHdMC8LV9Nd6jNzZv0p31tgPf Zd1+4IMjm0d1QGCENINHtKDzUArayZGq79Z+CXVJGsHQ8NCMZyhYjW5+dzZDi6/0B1RWoE MC3FtQxfdGaHSjFLj83ZQUmRkGSrH3VBaMyZASS46ZPY5895+CA7XGfxhtluNJSeqpth+O T+hQIHnAASYUOR3by4ctMvfJ83C2E9xBzeH/8laSXR61aTPwxEeR5R7X5dihMvmflBJZ6i 0XLFWXJWW76ppwbml836TZH0KmPFA8SFe8jbOvboHbMuuGjr8dGuuthW1mb+wQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695117191; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SY8oVWk6zlglMI9XbDrnIRIKpD+8JvKtwWhUjnX1BB4=; b=tsuOLHcnUoiTddt3Si4auxg2ULTyXvW/slbmrwmtVKyGiOt4WAVAQebVkGqGJ5vuH4ceAO cOxcXNDDBAavmRDw== From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block Cc: Josh Poimboeuf <jpoimboe@kernel.org>, Ingo Molnar <mingo@kernel.org>, "Borislav Petkov (AMD)" <bp@alien8.de>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org> References: <0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org> MIME-Version: 1.0 Message-ID: <169511719062.27769.2510260108122622522.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:54:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776218294438773999 X-GMAIL-MSGID: 1777470639558309692 |
Series |
[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Sept. 19, 2023, 9:53 a.m. UTC
The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 27ee0600912c8a02fd6901bc4413709282d7b3f8 Gitweb: https://git.kernel.org/tip/27ee0600912c8a02fd6901bc4413709282d7b3f8 Author: Josh Poimboeuf <jpoimboe@kernel.org> AuthorDate: Mon, 04 Sep 2023 22:04:59 -07:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Tue, 19 Sep 2023 11:42:48 +02:00 x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block Simplify the code flow a bit by moving the retbleed IBPB check into the existing 'has_microcode' block. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/0a22b86b1f6b07f9046a9ab763fc0e0d1b7a91d4.1693889988.git.jpoimboe@kernel.org --- arch/x86/kernel/cpu/bugs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 941ac94..6b443f0 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -2430,10 +2430,8 @@ static void __init srso_select_mitigation(void) setup_force_cpu_cap(X86_FEATURE_SRSO_NO); return; } - } - if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) { - if (has_microcode) { + if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) { srso_mitigation = SRSO_MITIGATION_IBPB; goto out; }