From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 04 Mar 2019 01:26:21 -0000 Received: from mx1.redhat.com ([209.132.183.28]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h0cN1-0005Y7-QK for speck@linutronix.de; Mon, 04 Mar 2019 02:26:20 +0100 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3E215D60D for ; Mon, 4 Mar 2019 01:24:57 +0000 (UTC) Received: from treble (ovpn-122-204.rdu2.redhat.com [10.10.122.204]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8774D5D71A for ; Mon, 4 Mar 2019 01:24:57 +0000 (UTC) Date: Sun, 3 Mar 2019 19:24:55 -0600 From: Josh Poimboeuf Subject: [MODERATED] [PATCH RFC 3/4] 3 Message-ID: <20190304012455.xi23xfddnexvdz2r@treble> References: <20190304012138.gikabpafseh2swre@treble> MIME-Version: 1.0 In-Reply-To: <20190304012138.gikabpafseh2swre@treble> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: From: Josh Poimboeuf Subject: [PATCH RFC 3/4] x86/speculation/mds: Add SMT warning message MDS is vulnerable with SMT. Make that clear with a one-time printk whenever SMT first gets enabled. Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/cpu/bugs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 9e20aef01d38..346f0f05879d 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -691,6 +691,8 @@ static void update_mds_branch_idle(void) static_branch_disable(&mds_idle_clear); } +#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" + void arch_smt_update(void) { /* Enhanced IBRS implies STIBP. No update required. */ @@ -715,6 +717,8 @@ void arch_smt_update(void) switch(mds_mitigation) { case MDS_MITIGATION_FULL: case MDS_MITIGATION_VMWERV: + if (sched_smt_active() && !boot_cpu_has(X86_BUG_MSBDS_ONLY)) + pr_warn_once(MDS_MSG_SMT); update_mds_branch_idle(); break; case MDS_MITIGATION_OFF: -- 2.17.2