public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Waiman Long <longman@redhat.com>
Cc: linux-tip-commits@vger.kernel.org,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Waiman Long <longman@redhat.com>, Borislav Petkov <bp@suse.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Mark Gross <mgross@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Tyler Hicks <tyhicks@canonical.com>, x86-ml <x86@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [tip: x86/pti] x86/speculation: Fix redundant MDS mitigation message
Date: Sat, 16 Nov 2019 15:24:11 +0100	[thread overview]
Message-ID: <20191116142411.GA23231@zn.tnic> (raw)
In-Reply-To: <157390711921.12247.3084878540998345444.tip-bot2@tip-bot2>

On Sat, Nov 16, 2019 at 12:25:19PM -0000, tip-bot2 for Waiman Long wrote:
> +static void __init mds_print_mitigation(void)
> +{
>  	pr_info("%s\n", mds_strings[mds_mitigation]);
>  }

Almost. This causes

MDS: Vulnerable

to be printed on an in-order 32-bit Atom here, which is wrong. I've
fixed it up to:

---
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index cb2fbd93ef4d..8bf64899f56a 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -256,6 +256,9 @@ static void __init mds_select_mitigation(void)
 
 static void __init mds_print_mitigation(void)
 {
+	if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off())
+		return;
+
 	pr_info("%s\n", mds_strings[mds_mitigation]);
 }
 

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2019-11-16 14:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 16:14 [PATCH v2 0/2] x86/speculation: Fix incorrect MDS/TAA mitigation status Waiman Long
2019-11-15 16:14 ` [PATCH v2 1/2] " Waiman Long
2019-11-15 17:09   ` Boris Petkov
2019-11-15 19:35     ` Thomas Gleixner
2019-11-15 20:21       ` Boris Petkov
2019-11-18  1:17         ` Waiman Long
2019-11-16 12:25   ` [tip: x86/pti] " tip-bot2 for Waiman Long
2019-11-15 16:14 ` [PATCH v2 2/2] x86/speculation: Fix redundant MDS mitigation message Waiman Long
2019-11-16 12:25   ` [tip: x86/pti] " tip-bot2 for Waiman Long
2019-11-16 14:24     ` Borislav Petkov [this message]
2019-11-18  1:22       ` Waiman Long
2019-11-16 14:38   ` tip-bot2 for Waiman Long
2019-11-15 16:17 ` [PATCH v2 0/2] x86/speculation: Fix incorrect MDS/TAA mitigation status Waiman Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191116142411.GA23231@zn.tnic \
    --to=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgross@linux.intel.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tony.luck@intel.com \
    --cc=tyhicks@canonical.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox