linux/arch
Borislav Petkov 12a634b60a x86/microcode/AMD: Apply the patch early on every logical thread
commit e7ad18d116 upstream.

Currently, the patch application logic checks whether the revision
needs to be applied on each logical CPU (SMT thread). Therefore, on SMT
designs where the microcode engine is shared between the two threads,
the application happens only on one of them as that is enough to update
the shared microcode engine.

However, there are microcode patches which do per-thread modification,
see Link tag below.

Therefore, drop the revision check and try applying on each thread. This
is what the BIOS does too so this method is very much tested.

Btw, change only the early paths. On the late loading paths, there's no
point in doing per-thread modification because if is it some case like
in the bugzilla below - removing a CPUID flag - the kernel cannot go and
un-use features it has detected are there early. For that, one should
use early loading anyway.

  [ bp: Fixes does not contain the oldest commit which did check for
    equality but that is good enough. ]

Fixes: 8801b3fcb5 ("x86/microcode/AMD: Rework container parsing")
Reported-by:  Ștefan Talpalaru <stefantalpalaru@yahoo.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by:  Ștefan Talpalaru <stefantalpalaru@yahoo.com>
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216211
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-03 23:50:50 +09:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:06:52 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:15:31 +02:00
arm ARM: dts: imx6sl: add missing properties for sram 2022-10-26 13:17:12 +02:00
arm64 arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma 2022-09-28 10:56:50 +02:00
blackfin
c6x
cris
frv
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 14:00:33 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:40:40 +01:00
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() 2022-08-25 11:11:12 +02:00
m32r
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-06-25 11:46:38 +02:00
metag
microblaze microblaze: Prevent the overflow of the start 2020-02-28 16:36:08 +01:00
mips MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-26 13:17:08 +02:00
mn10300
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:11:34 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 16:53:45 +02:00
parisc parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines 2022-09-15 12:23:51 +02:00
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 13:17:08 +02:00
s390 s390: fix nospec table alignments 2022-09-15 12:23:51 +02:00
score
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:16:58 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-06-25 11:46:39 +02:00
tile
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:16:56 +02:00
unicore32
x86 x86/microcode/AMD: Apply the patch early on every logical thread 2022-11-03 23:50:50 +09:00
xtensa xtensa: Fix refcount leak bug in time.c 2022-07-02 16:18:09 +02:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:17:59 +01:00