[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
Message ID | 169547160829.27769.14260324093851417943.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp249596vqu; Sat, 23 Sep 2023 08:50:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOq2/EWFkvN1jXUMitCCemtrNXukD/NFaqoKuLnXpjsFGc9pShvKnsq25FusgxgVYafMP3 X-Received: by 2002:a17:90b:4b86:b0:273:83ac:5eb9 with SMTP id lr6-20020a17090b4b8600b0027383ac5eb9mr8159165pjb.4.1695484238670; Sat, 23 Sep 2023 08:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695484238; cv=none; d=google.com; s=arc-20160816; b=iEXwh0qcDZ+iUTnCt1ExRSClNNVh3KPy46l2q3fyfYemhc0M/1TYSVnBKmb39n7MBw gMMOZd5WTfs/ccGNm8S1P9fmgmk/EPuLNUoZjr27J2hCZ4W2wVb8/eBI7bS7Px2c/IUz goHxh1iHeXketlR0sSkotfPhU+ViK6jpVAYnsjnht0ua8wI4sd/EjhbifAWNOjYvkKsK N/k0aJp2o3q11xrD1rdA1PZTTQlA1l4AMNxp46lcaDtbv7vM0wfJOsI0aFM6hP7TkE8D X4KmKehG4BsWjeZQ5bQk+K0doy/rT863xTa5qzaHgjJHjIFqk+WoG9ECgsbx4/Kw0d9g 3JLA== 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=yV846f86WwDQ6kBwtM1IpEG+32B/WRisw02scmbEy4Y=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=WbH0zl+c+r9dh+vU4pUORzwQQMLyOMNHmqzjfAD/OmeeNw1xeKnbzZbNvvqYEKn+JB JhBQG08sEgV4jP/hFQag6hViQyrXvasOtt99/iJGMisq82a31XzgizhdVWbHY5VuAewg qLQkqvk2i7Vw1R2+6n/fVndZQ9WfMK+XQOT65yR5B2BBCt3uNDoPgVyjgVQ1CYxWMW9+ sAoggdVazQdzHSDZPhGllZ+whOcCIyphMMuKFyGHqC0I4hCy2k3MiAmWHeCf3sYalUic tbwKiPCXnXWTvoA3TgAdmkvh/ZrRH2XjJEQZJdroeYm0p+Au/H5UjwqLZ9r+gpmY8/eE Y6wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="H3yi/h5a"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h6-20020a17090ac38600b002717acb93f1si6108307pjt.83.2023.09.23.08.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 08:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="H3yi/h5a"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 07A6281393E3; Sat, 23 Sep 2023 05:20:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231637AbjIWMUh (ORCPT <rfc822;chrisfriedt@gmail.com> + 29 others); Sat, 23 Sep 2023 08:20:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbjIWMUS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 23 Sep 2023 08:20:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C55231A6; Sat, 23 Sep 2023 05:20:11 -0700 (PDT) Date: Sat, 23 Sep 2023 12:20:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1695471608; 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=yV846f86WwDQ6kBwtM1IpEG+32B/WRisw02scmbEy4Y=; b=H3yi/h5aQyBngla1raxAGUEhKoGjRrAdiii9F3OYy/1WlG31TV46iTRXl6xYbMY348Q5cQ vQ35vP52BCWX3xEHH3jCTVZXU/TnkIzLfNa18QAAZmZ4iWEcjYqr+iDPZhtN3FoLAxlfMI PxioJEb7sPtcyqe+JLlWXVlZE1dYopOMX5Pjb9rH4/EocbAzcCmBmtiqc0mIz7+JhjbTTS weY7XU92eVBTO/fVizy1b3+gi7smTCbmRqJqM80wn5yRnCkaOWfLG72LEXJxKux8IF8JVt DhbjqKL+EDhTUq6wnQJPad+mDEnatwyRBidlwpTjG8emVvFuGvhRQKwrhJFsIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1695471608; 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=yV846f86WwDQ6kBwtM1IpEG+32B/WRisw02scmbEy4Y=; b=H3gnx9gBW3djpisAPsmEpKL4p1AcCdtMcedtd1adibgX+KkFOn7N9AUcuKlim8tjooxnyy OKSYkci5ut5M6NCA== 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: <169547160829.27769.14260324093851417943.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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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: <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 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 05:20:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776218294438773999 X-GMAIL-MSGID: 1777844080863016500 |
Series |
[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Sept. 23, 2023, 12:20 p.m. UTC
The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 074c9666d42211d0f70d5c156d377a4881b2a98c Gitweb: https://git.kernel.org/tip/074c9666d42211d0f70d5c156d377a4881b2a98c Author: Josh Poimboeuf <jpoimboe@kernel.org> AuthorDate: Mon, 04 Sep 2023 22:04:59 -07:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Sat, 23 Sep 2023 14:13:03 +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; }