[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
Message ID | 169780183877.3135.16167476121418163828.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:2010:b0:403:3b70:6f57 with SMTP id fe16csp990531vqb; Fri, 20 Oct 2023 04:38:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHdji1yhAmxp/qI707joDaR6Ia2A1wOviG7y/lZwM6cA6dc6jLQChyCFkobDPCaLuPd1GtL X-Received: by 2002:aa7:9718:0:b0:6be:25c5:4f74 with SMTP id a24-20020aa79718000000b006be25c54f74mr1309657pfg.13.1697801887506; Fri, 20 Oct 2023 04:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697801887; cv=none; d=google.com; s=arc-20160816; b=l/WyLvc/9QVDkRzTdbyP8ZciVxVXHAZXbuq0SdSe3uUOIyKAX9zGKcpxzGpClX30jm 6bCXKOOSSLkyYIs18KF5DZF8HSLKCKR9h/R2DdGnnEMmOvclMM225q+1w5wjJwuRK+KS +yJHD1UO4iW+t6ydg4sYQXbaByloLDppDLoMoHsW8vKS5LTSGG/L1g7yBd4n+Ow5A+/j 9f+YWuc9Gxum3bkSoATaTojsFSPxfp7pCKUYfqX3P/vnEj1eYvWxk1NB0Cg32PBhN3rZ 0c4TKqaCb5aKUMkBmrlrXW8IceJsrn1wClgXJTduG11FvlpSNm8DW6mgO36fIBfux+x8 qaDg== 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=T7rquPvt7QDQYVBgfg7x6sEf6nSLkJi4u/H+hJZVgpQ=; fh=TJa98jjcJcAUyvo2yQiOqi+wukdLlQU80th5XskGe8U=; b=0yxzYWeVgk2D9vfrVRfrX1xH3kAo+8W0pV28/maEG9qE3lJLN4xMwhba8wtc4+9mGR gv5Ug8gGDQOCo9x19IJw/sLvBEvFJQ+5a0slxmL2crltuRXOp/aSmId/xkAoUwWgtDuQ LPLFjfkQ5Oriaxi0R+POWhW1/O7fjJ/0DhpKQJVGnZdZlTL4gxGrOLiT+dv1v6n6DK45 cd3LyfSbFn8TeWU3SUk6ce4sb+dqYmUB6PazditOU4lMMZNhK2A4YKtVhxl3yz5854n+ tfTQ0MCxjJs4aQbgnbsOsFVpYXTrJl0sL7ECYFjov9VtFKNbhkOMHL82BOlzx5sl9eXU pcwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rFfSAjl8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id f9-20020a056a0022c900b00690c19cb105si1851102pfj.250.2023.10.20.04.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:38:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rFfSAjl8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id DBC2183F69B0; Fri, 20 Oct 2023 04:38:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377281AbjJTLhp (ORCPT <rfc822;lkml4gm@gmail.com> + 25 others); Fri, 20 Oct 2023 07:37:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377107AbjJTLhX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Oct 2023 07:37:23 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C14DBD5B; Fri, 20 Oct 2023 04:37:20 -0700 (PDT) Date: Fri, 20 Oct 2023 11:37:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697801839; 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=T7rquPvt7QDQYVBgfg7x6sEf6nSLkJi4u/H+hJZVgpQ=; b=rFfSAjl8/PxgczolkAh73sOxI2xvBLrFo5zXVzUNieFghPDZUxYCNwOo5Ph15a5GYK32sA QH5fQ0rk6vwVlA6QFhcmBvbgjQqOgXZ/pzF7Qxpv2aKZNp32lsY9WN+hL34z+2hCC0iZ9I uul9QmtSeDjr0gZizeG1i893UM01mp3pkYciJ/iP5dQTA6Yb0pPXz+0sTlXk2fJ2rbgR9R JnphsQlSiqoHz6ijlr8IiCFh83e39SrJRyYm90Z97c6GugVNdZ1mh9b4zSBgXZfFieo/HG ZsiCiC/7sd1MUkRNHthKGk7/Bupe3hAMadnW/07dzuW0nX3DDI1NMtLXzxiSxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697801839; 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=T7rquPvt7QDQYVBgfg7x6sEf6nSLkJi4u/H+hJZVgpQ=; b=RwK4D5/YuUONiOXgiGKvv1ktKXph0Klyt16WrJU2vwep31Pb2tLLuGzAKnb+eOJIQfgUyv rYBnFQyYzBvXjzCQ== 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: <169780183877.3135.16167476121418163828.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.8 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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 04:38:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776218294438773999 X-GMAIL-MSGID: 1780274312090094191 |
Series |
[tip:,x86/bugs] x86/srso: Move retbleed IBPB check into existing 'has_microcode' code block
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Oct. 20, 2023, 11:37 a.m. UTC
The following commit has been merged into the x86/bugs branch of tip: Commit-ID: 351236947a45a512c517153bbe109fe868d05e6d Gitweb: https://git.kernel.org/tip/351236947a45a512c517153bbe109fe868d05e6d Author: Josh Poimboeuf <jpoimboe@kernel.org> AuthorDate: Mon, 04 Sep 2023 22:04:59 -07:00 Committer: Borislav Petkov (AMD) <bp@alien8.de> CommitterDate: Fri, 20 Oct 2023 12:29:25 +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> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> 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; }