Message ID | 170151396382.398.13488399404074572021.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1691848vqy; Sat, 2 Dec 2023 02:46:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO4kgQ5fqWdHpT+oglYJLUil/rgEZ0xq33sDqwP0OvAsk30Heh2FZCnF1ea/IXa55bU+s3 X-Received: by 2002:a05:6870:e6d4:b0:1fb:75a:6d40 with SMTP id s20-20020a056870e6d400b001fb075a6d40mr1376373oak.103.1701513975466; Sat, 02 Dec 2023 02:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701513975; cv=none; d=google.com; s=arc-20160816; b=HIq5X/hhdE6wFW9YPzTCYDNIQFALJbaswgxeyCOUwGY4LVDoYX8NdaARXeS/G/NX// 4EjEWSdcj+zeApAWoeRg/GaHPZmMFqexjAyoyWR7rBxq68gJBXYKqokdEVAT9xbDarug o7L0slg34xpOlS6unMykx41vZwS2eOv1Vap2htpWPAzpEJceti5bhbAEhx5B7Jk4tVNp Y/lKZ9zcNK6AmhCej4HkWbY9NGBMy0CpwB9rS3nhTCtLDq5dEMds545Q1IK+AVaLCTsr iFelJIXYMCSrQiRG3qKHm02lQdWP8PDS/3zE+YvfS8Tgn6JgS+ijEuP1vOdeubKjeTBO 6O4g== 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=K6kPvZSlBQ8JhN9p8gUC/qjj/w3vTn3U0EtoaGJS2Dg=; fh=yY7b0XtASGTFHlHYtzyMOxQCG0yi/ePD67vsguiA9kc=; b=fD4Z8S/hZGzc4iavya26LfR4+sm3/oZrz6db2FRTjAVv5hYZIbW4n2GCo5j3fOSAsM FVM+SESOsgspziqcqpf55BXAoJx6aRmfYYcbnCaHvUFNPG0ACCwsFcXkAtgBC6pm21+O LXqtFSvDnBbdtaFtzbuYAZn0ZByqaY+WrOlQbP2MmDvkakIENpmCtzmU/WlgDF7mehEb Xv7NxcFNvft4uNmZ5u7Par4q16bW9aZZp2y8Br85j5iTdgGUTkZq0NXUTMTmuxeNpwd0 ouUuVia6KHzUp+/6HWwQQWpLyLUfyafrNQcrvzGafRTi7ifzU8BQhEbLFr7rsGfcSu8s C3LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=duD6sljq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s26-20020a65691a000000b005c66b0c9dd7si228415pgq.786.2023.12.02.02.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 02:46:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=duD6sljq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id A7647803A538; Sat, 2 Dec 2023 02:46:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232462AbjLBKqC (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Sat, 2 Dec 2023 05:46:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjLBKqB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 2 Dec 2023 05:46:01 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BE5123; Sat, 2 Dec 2023 02:46:07 -0800 (PST) Date: Sat, 02 Dec 2023 10:46:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701513964; 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=K6kPvZSlBQ8JhN9p8gUC/qjj/w3vTn3U0EtoaGJS2Dg=; b=duD6sljqbJYnjaALP4h1bHbUzsU06Z4KlecwGR+bN4H43hF3vlNs/WBUQdspGTF2aBX7o+ k/EKck9rrOFvl7YfN/g7x397hlZCuujf9NT/l84xpFDQHScTRb7U79imKtoOwmwQFltGJd 6WlSUn8o9L3DH00Il1PFN+sQ3neCq2LAaA1wHuiTWrmVbxzxgSBRKXd65r5KiphmcX9M5Y L3kwjv7g39XG/ZrH1NzeT4+njPa3zaSozT7fjExP4g1ig/4g2YD/tInEUTYxIfTcQ0A3so LHMZDbI6rteKRhC8hDAhUKk+MMYflF6MCC3Bs27FUSSM7I/XzSCXxuKm9dd16A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701513964; 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=K6kPvZSlBQ8JhN9p8gUC/qjj/w3vTn3U0EtoaGJS2Dg=; b=dlybmCKM0y03bWUQTFPhuS2VNpWCVauxOWtOm+D4qOWiW8zJGHS8Cih/Bzyn6BVdM7Frrg rJbGhlCSr1mgleCA== From: "tip-bot2 for Borislav Petkov (AMD)" <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/urgent] x86/CPU/AMD: Check vendor in the AMD microcode callback Cc: <stable@kernel.org>, "Borislav Petkov (AMD)" <bp@alien8.de>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231201184226.16749-1-bp@alien8.de> References: <20231201184226.16749-1-bp@alien8.de> MIME-Version: 1.0 Message-ID: <170151396382.398.13488399404074572021.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,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sat, 02 Dec 2023 02:46:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784106108219199770 X-GMAIL-MSGID: 1784166718308192219 |
Series |
[tip:,x86/urgent] x86/CPU/AMD: Check vendor in the AMD microcode callback
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Dec. 2, 2023, 10:46 a.m. UTC
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 9b8493dc43044376716d789d07699f17d538a7c4
Gitweb: https://git.kernel.org/tip/9b8493dc43044376716d789d07699f17d538a7c4
Author: Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate: Fri, 01 Dec 2023 19:37:27 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Sat, 02 Dec 2023 11:40:24 +01:00
x86/CPU/AMD: Check vendor in the AMD microcode callback
Commit in Fixes added an AMD-specific microcode callback. However, it
didn't check the CPU vendor the kernel runs on explicitly.
The only reason the Zenbleed check in it didn't run on other x86 vendors
hardware was pure coincidental luck:
if (!cpu_has_amd_erratum(c, amd_zenbleed))
return;
gives true on other vendors because they don't have those families and
models.
However, with the removal of the cpu_has_amd_erratum() in
05f5f73936fa ("x86/CPU/AMD: Drop now unused CPU erratum checking function")
that coincidental condition is gone, leading to the zenbleed check
getting executed on other vendors too.
Add the explicit vendor check for the whole callback as it should've
been done in the first place.
Fixes: 522b1d69219d ("x86/cpu/amd: Add a Zenbleed fix")
Cc: <stable@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231201184226.16749-1-bp@alien8.de
---
arch/x86/kernel/cpu/amd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index a7eab05..f322ebd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -1320,6 +1320,9 @@ static void zenbleed_check_cpu(void *unused) void amd_check_microcode(void) { + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) + return; + on_each_cpu(zenbleed_check_cpu, NULL, 1); }