mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/7] x86/microcode: Incremental Loading and Early Minimum Revision Check
@ 2026-11-16 16:45 Chang S. Bae
  2026-11-16 16:45 ` [PATCH v2 1/7] x86/microcode: Avoid spurious base_rev= match Chang S. Bae
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Chang S. Bae @ 2026-11-16 16:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, tglx, mingo, bp, dave.hansen, hpa, andrew.cooper3,
	arjan.van.de.ven, chang.seok.bae

Hi all,

This series came up with the microcode loading issues [1] previously. The
immediate fix, which prevents problematic blobs from being loaded, has
been merged to the mainline and backported to stable trees. This revision
follows up with two longer-term solutions addressing the underlying
issues.

First, let me summarize the changes since the previous posting [2] in
parts:

  Part 1, patch 1-3: Preparatory fixes
   * Only minor updates to changelogs and patch subjects.

  Part 2, patch 4-5: Late-loading - incremental Loading
   * Rename the approach to "incremental loading" to better describe
     the intention of advancing revisions through multiple updates.
   * Move this part ahead of the early minimum revision check, since
     the check now recommends incremental loading when fails.

  Part 3, patch 6-7: Early-loading - early minimum revision check
   * Keep this part in RFC status for now, as the resulting tainting
     behavior wants more reviews
   * Do not extend force_minrev to early loading, since doing so would
     reject all early loadings on AMD systems.

Below is more detail about the longer-term solutions, largely carried
from the previous posting [2].

1. Incremental Late Loading

  Looking at Intel microcode releases [3], the repository traditionally 
  provides the latest blob. When updating from an older revision, admins 
  may need to retrieve prerequisite older revisions from the git history. 
  This can be inefficient and error-prone.

  Intel will now concatenate prerequisite older blobs with the latest 
  blob together into a multi-blob image. The kernel, however, currently 
  selects the highest loadable revision, or at best one prerequisite when 
  the minimum revision check is enforced. Admins may need to trigger 
  multiple loads manually.

  Instead the kernel loader can facilitate iterative loading to apply the 
  available blobs incrementally. There are some possible ways to 
  implement this:

    (1) One is to rely on the minimum revision check and select the 
        highest revision whose prerequisite has been loaded already. 
    (2) Another is to load the blobs sequentially according to the order 
        in the image.

  Both approaches have drawbacks: (1) depends on the minimum revision 
  information being correct, while (2) is sensitive to blob ordering.

  The approach here selects the lowest loadable revision on each 
  iteration, so that the blobs to be applied incrementally (patch 4-5).

2. Early Minimum Revision Check

  The minimum revision information can serve as a more general revision
  dependency check, rather than being limited to runtime changes. This
  part extends the minimum revision check to early loading (patch 6-7).

  Although the implementation itself isn't complex, there are some 
  user-visible consequences:

    * For Intel, early loading of older patches without minimum revision
      information would result in kernel tainting. 

    * For AMD, the absence of the field could result in tainting _every_ 
      successful update unless explicitly treating AMD patches as safe. 
      To me, it is unclear whether the absence of this field reflects a 
      lack of such dependencies or simply a difference in the vendor's 
      microcode format.

    * Another consideration is force_minrev. Extending it to early 
      loading would reject all early loading on AMD systems, equivalent
      to disabling the loader entirely. Since the existing build-time and 
      command-line option descriptions are specific to late loading, I 
      have kept its semantics unchanged.

  For now, I'm keeping this part as RFC material. Depending on the
  feedback, the series could move forward with a smaller series, leaving 
  this part to follow after landing part1/2.

The patch set is available in this repository:
  git://github.com/intel-staging/microcode.git incr-loading-and-early-minrev-v2

Thanks,
Chang

[1] GNR98. MCE When Early OS Microcode Update to MCU 0x1000405 Release or Later
[2] https://lore.kernel.org/lkml/20260901231634.714144-1-chang.seok.bae@intel.com
[3] https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git

Chang S. Bae (7):
  x86/microcode: Avoid spurious base_rev= match
  x86/microcode: Accept a boolean for force_minrev parameter
  x86/microcode: Mark early_data __initdata
  x86/microcode: Introduce incremental late loading
  x86/microcode/intel: Select the lowest revision for incremental
    loading
  x86/microcode: Decouple minimum revision check from late loading
  x86/microcode/intel: Apply minimum revision check to early loading

 .../admin-guide/kernel-parameters.txt         | 11 ++-
 arch/x86/Kconfig                              | 13 +++
 arch/x86/kernel/cpu/microcode/core.c          | 91 ++++++++++++++++---
 arch/x86/kernel/cpu/microcode/intel.c         | 63 ++++++++-----
 arch/x86/kernel/cpu/microcode/internal.h      |  9 +-
 5 files changed, 147 insertions(+), 40 deletions(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.53.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-16 17:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 16:45 [PATCH v2 0/7] x86/microcode: Incremental Loading and Early Minimum Revision Check Chang S. Bae
2026-11-16 16:45 ` [PATCH v2 1/7] x86/microcode: Avoid spurious base_rev= match Chang S. Bae
2026-11-16 16:45 ` [PATCH v2 2/7] x86/microcode: Accept a boolean for force_minrev parameter Chang S. Bae
2026-11-16 16:45 ` [PATCH v2 3/7] x86/microcode: Mark early_data __initdata Chang S. Bae
2026-11-16 16:45 ` [PATCH v2 4/7] x86/microcode: Introduce incremental late loading Chang S. Bae
2026-11-16 16:45 ` [PATCH v2 5/7] x86/microcode/intel: Select the lowest revision for incremental loading Chang S. Bae
2026-11-16 16:45 ` [PATCH RFC v2 6/7] x86/microcode: Decouple minimum revision check from late loading Chang S. Bae
2026-11-16 16:45 ` [PATCH RFC v2 7/7] x86/microcode/intel: Apply minimum revision check to early loading Chang S. Bae

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®