Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1751474iog; Tue, 14 Jun 2022 12:28:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vPajtXJ9Shs930qEIGDACfnTKiezM0gSkCo5TP6kLT56LtzbirosDAwyJXrsL1VP4uBzFv X-Received: by 2002:a17:90b:1e47:b0:1e6:7d04:2f4 with SMTP id pi7-20020a17090b1e4700b001e67d0402f4mr5977224pjb.93.1655234900279; Tue, 14 Jun 2022 12:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655234900; cv=none; d=google.com; s=arc-20160816; b=LRFbm03EDVjXc/tUjdTWwCZcN7SgXjnzv3q6ZNtsZ5SIiYORKO51IH4pPCCYMwb/f7 L8WWYpWctyh8Sxlu82s/AYeLZnk7BWW7nsujOjpzJBHfSpW2MAuzy2WZOoVR1gK20+i+ /w39FmHBc42BE4bU9dyvYG50i+BFV8NmWggHF8NQVs9BR1BiugHGL5EuCnmJSjOaM5ON vVIVbfvRT7iL3cB7zxs7IRsVIvI18sdTjlxjK5tT2OYzoUsWuwD8UqQtbhIiTtJcOTY/ WkwUyudcW+MKlvoBPmafmJVcBfwILkng5mCrxGPhRO6rctJiJnT/IiT/xphz78s/hT7c stJQ== 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=8SU0fUIM/iVUzTNeOH5xWcKBnWJWkESJ0+47y5x0+QE=; b=qYFOs5OZYrjpKfaW6UlFawfSs9nZh9UQ/YsNo4s/J2MtzCuqelYn25sb/lh+4iFdfB DslUf1VrhW4SbdEFb/hI7hxRdc53Gtp6yR5vf9lBvFz9JEY+U/bcVq3ROJ6ITGMARTFA ezy8Ok7WHqyvLgSYhEyyy6wfesEZOel+9MJJ7cqE1RZf+ivVs4w+bn0KV2FkT5uINAcm vYsi/fr2BMFvsOiNENrVLu5oqp210ps1yNXa6Ee/SmzkANzlLxvaqvy6NonLSEOghywk YDfWESAY2lHMmsv/EF9+AZSvgJ+beSardNKwmXSrDBkFUFcr+2wBbm5wVYaXqu71gIH7 sTsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OtnQsJwK; 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 b24-20020a170902d89800b00163c985bb45si13223229plz.101.2022.06.14.12.28.07; Tue, 14 Jun 2022 12:28:20 -0700 (PDT) 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=OtnQsJwK; 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 S1358124AbiFNSuH (ORCPT + 99 others); Tue, 14 Jun 2022 14:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357682AbiFNSrb (ORCPT ); Tue, 14 Jun 2022 14:47:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 538BF4BFDA; Tue, 14 Jun 2022 11:44:32 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id C1442617F4; Tue, 14 Jun 2022 18:44:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D09F7C3411B; Tue, 14 Jun 2022 18:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655232271; bh=q8/qGSvsKwTccqkI+Vxlud//DYB9t124nyHeP+iMb3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OtnQsJwKQAMuG67uJ24jchcjs46XErW93pENdj0a1b91YQmOPQY6sY7mmvxaTK+EZ 1T/R/Kasi9uZnRus1Bp7UdlgYe56qN/RDA1BimNpWz0ZGU+clSBT+FvTJcM7fsobQe vmz+Jw47bKewoCf6TrKCv/rS/jENGwEyPifgIHsc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josh Poimboeuf , Thomas Gleixner Subject: [PATCH 5.10 11/11] x86/speculation/mmio: Print SMT warning Date: Tue, 14 Jun 2022 20:40:33 +0200 Message-Id: <20220614183722.651703711@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220614183719.878453780@linuxfoundation.org> References: <20220614183719.878453780@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=-8.3 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: Josh Poimboeuf commit 1dc6ff02c8bf77d71b9b5d11cbc9df77cfb28626 upstream Similar to MDS and TAA, print a warning if SMT is enabled for the MMIO Stale Data vulnerability. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/bugs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1221,6 +1221,7 @@ static void update_mds_branch_idle(void) #define MDS_MSG_SMT "MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.\n" #define TAA_MSG_SMT "TAA CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html for more details.\n" +#define MMIO_MSG_SMT "MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.\n" void cpu_bugs_smt_update(void) { @@ -1265,6 +1266,16 @@ void cpu_bugs_smt_update(void) break; } + switch (mmio_mitigation) { + case MMIO_MITIGATION_VERW: + case MMIO_MITIGATION_UCODE_NEEDED: + if (sched_smt_active()) + pr_warn_once(MMIO_MSG_SMT); + break; + case MMIO_MITIGATION_OFF: + break; + } + mutex_unlock(&spec_ctrl_mutex); }