public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Cc: stable@vger.kernel.org, dave.hansen@linux.intel.com, tglx@linutronix.de
Subject: Re: [PATCH 5.15.y] x86/mm: Avoid incomplete Global INVLPG flushes
Date: Sun, 28 May 2023 08:39:30 +0100	[thread overview]
Message-ID: <2023052820-lilac-email-41e1@gregkh> (raw)
In-Reply-To: <20230527001834.1208927-1-daniel.sneddon@linux.intel.com>

On Fri, May 26, 2023 at 05:18:34PM -0700, Daniel Sneddon wrote:
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> The INVLPG instruction is used to invalidate TLB entries for a
> specified virtual address.  When PCIDs are enabled, INVLPG is supposed
> to invalidate TLB entries for the specified address for both the
> current PCID *and* Global entries.  (Note: Only kernel mappings set
> Global=1.)
> 
> Unfortunately, some INVLPG implementations can leave Global
> translations unflushed when PCIDs are enabled.
> 
> As a workaround, never enable PCIDs on affected processors.
> 
> I expect there to eventually be microcode mitigations to replace this
> software workaround.  However, the exact version numbers where that
> will happen are not known today.  Once the version numbers are set in
> stone, the processor list can be tweaked to only disable PCIDs on
> affected processors with affected microcode.
> 
> Note: if anyone wants a quick fix that doesn't require patching, just
> stick 'nopcid' on your kernel command-line.
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: stable@vger.kernel.org
> (cherry picked from commit ce0b15d11ad837fbacc5356941712218e38a0a83)
> Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
> ---
>  arch/x86/include/asm/intel-family.h |  5 +++++
>  arch/x86/mm/init.c                  | 25 +++++++++++++++++++++++++
>  2 files changed, 30 insertions(+)

All now queued up, thanks.

greg k-h

      reply	other threads:[~2023-05-28  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 19:27 FAILED: patch "[PATCH] x86/mm: Avoid incomplete Global INVLPG flushes" failed to apply to 5.15-stable tree gregkh
2023-05-27  0:18 ` [PATCH 5.15.y] x86/mm: Avoid incomplete Global INVLPG flushes Daniel Sneddon
2023-05-28  7:39   ` Greg KH [this message]

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=2023052820-lilac-email-41e1@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel.sneddon@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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