linux/arch/x86
Borislav Petkov (AMD) 1d81d85d1a x86/microcode/AMD: Split load_microcode_amd()
This function should've been split a long time ago because it is used in
two paths:

1) On the late loading path, when the microcode is loaded through the
   request_firmware interface

2) In the save_microcode_in_initrd() path which collects all the
   microcode patches which are relevant for the current system before
   the initrd with the microcode container has been jettisoned.

   In that path, it is not really necessary to iterate over the nodes on
   a system and match a patch however it didn't cause any trouble so it
   was left for a later cleanup

However, that later cleanup was expedited by the fact that Jens was
enabling "Use L3 as a NUMA node" in the BIOS setting in his machine and
so this causes the NUMA CPU masks used in cpumask_of_node() to be
generated *after* 2) above happened on the first node. Which means, all
those masks were funky, wrong, uninitialized and whatnot, leading to
explosions when dereffing c->microcode in load_microcode_amd().

So split that function and do only the necessary work needed at each
stage.

Fixes: 94838d230a ("x86/microcode/AMD: Use the family,model,stepping encoded in the patch ID")
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/91194406-3fdf-4e38-9838-d334af538f74@kernel.dk
2024-10-22 16:48:00 +02:00
..
boot mm: rework accept memory helpers 2024-09-01 20:26:07 -07:00
coco x86/tdx: Fix "in-kernel MMIO" check 2024-09-26 09:45:04 -07:00
configs tinyconfig: remove unnecessary 'is not set' for choice blocks 2024-09-01 20:34:38 +09:00
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
entry x86/entry_32: Clear CPU buffers after register restore in NMI return 2024-10-08 15:16:28 -07:00
events Performance events changes for v6.12: 2024-09-18 15:03:58 +02:00
hyperv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
ia32
include x86/bugs: Use code segment selector for VERW operand 2024-10-09 09:42:30 +02:00
kernel x86/microcode/AMD: Split load_microcode_amd() 2024-10-22 16:48:00 +02:00
kvm KVM/arm64 fixes for 6.12, take #1 2024-10-06 03:59:22 -04:00
lib move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm x86: 2024-09-28 09:20:14 -07:00
net bpf, x64: Fix a jit convergence issue 2024-09-04 16:46:22 -07:00
pci x86/PCI: Check pcie_find_root_port() return for NULL 2024-08-21 15:28:08 -05:00
platform xen: branch for v6.12-rc1a 2024-09-27 09:55:30 -07:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools Changes: 2024-05-19 11:32:42 -07:00
um This pull request contains the following changes for UML: 2024-09-27 12:48:48 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt - Add support for running the kernel in a SEV-SNP guest, over a Secure 2024-07-16 11:12:25 -07:00
xen xen: branch for v6.12-rc1a 2024-09-27 09:55:30 -07:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig x86/lam: Disable ADDRESS_MASKING in most cases 2024-10-21 15:05:43 -07:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
Kconfig.cpu
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile rust: cfi: add support for CFI_CLANG with Rust 2024-09-16 17:29:58 +02:00
Makefile_32.cpu
Makefile.postlink
Makefile.um arch: um: rust: Use the generated target.json again 2024-07-03 12:22:11 +02:00