mirror-linux/arch
Dave Hansen c26b9e1931 x86/mm: Avoid incomplete Global INVLPG flushes
commit ce0b15d11a upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 14:03:17 +01:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:50:31 +01:00
arc
arm ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings 2023-05-24 17:32:31 +01:00
arm64 arm64: Also reset KASAN tag if page is not PG_mte_tagged 2023-05-30 14:03:17 +01:00
csky
hexagon
ia64 ia64: fix an addr to taddr in huge_pte_offset() 2023-05-11 23:03:40 +09:00
loongarch LoongArch: Mark 3 symbol exports as non-GPL 2023-04-26 14:28:38 +02:00
m68k m68k: Only force 030 bus error if PC not in exception table 2023-03-30 12:49:17 +02:00
microblaze
mips MIPS: fw: Allow firmware to pass a empty env 2023-05-11 23:03:01 +09:00
nios2
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-11 23:03:35 +09:00
parisc parisc: Replace regular spinlock with spin_trylock on panic path 2023-05-24 17:32:42 +01:00
powerpc powerpc/64s/radix: Fix soft dirty tracking 2023-05-24 17:32:52 +01:00
riscv rethook, fprobe: do not trace rethook related functions 2023-05-24 17:32:53 +01:00
s390 rethook, fprobe: do not trace rethook related functions 2023-05-24 17:32:53 +01:00
sh sh: nmi_debug: fix return value of __setup handler 2023-05-17 11:53:45 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-10 09:33:27 +01:00
um UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:50:32 +01:00
x86 x86/mm: Avoid incomplete Global INVLPG flushes 2023-05-30 14:03:17 +01:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-06 12:10:54 +02:00
.gitignore
Kconfig