x86/cpu: Take Intel platform into account for old microcode checks
Status from this message: The following commit has been merged into the x86/microcode branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 8 repliesApplied
- v34 patches 0 repliesSuperseded
- v26 patches 22 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 6 patches | 28 replies | Superseded |
Changes from v2 from the cover letter
* Move new helpers from .h into .c file. This avoids the #include dependency issues for now. That can be dealt with another day.
* Rename x86_platform_id to have an intel_ prefix and add a union to make it clear that AMD can use the space for something else
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | x86/microcode: Refactor platform ID enumeration into a helperarch/ | +42 | 5 replies | |
| 2/4 | x86/cpu: Add platform ID to CPU info structurearch/ arch/ arch/ +1 more | +9 | 3 replies | |
| 3/4 | x86/cpu: Add platform ID to CPU matching structurearch/ include/ | +5 | 0 replies | |
| 4/4 | x86/microcode: Add platform mask to Intel microcode "old" listarch/ | +238 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Sohil Mehta | Zhao Liu | Pawan Gupta |
|---|---|---|---|
| 1/4 | R-b | R-b | |
| 2/4 | R-b | R-b | |
| 3/4 | R-b | ||
| 4/4 | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 0/4] x86/cpu: Take Intel platform into account for old microcode checks
Chagnes from v3:
* Fix handling of the Pentium II's "no platform" goofiness.
Note: this was found in a Github Copilot review of the series. I wrote the solution.
* Rebase to 7.0-rc2
Changes from v2:
* Move new helpers from .h into .c file. This avoids the #include dependency issues for now. That can be dealt with another day.
* Rename x86_platform_id to have an intel_ prefix and add a union to make it clear that AMD can use the space for something else
Changes from v1:
* Fix non-x86 PECI compile issues by lifting some x86 macros into an arch-independent header.
* Make intel_get_platform_id() match its name and return an ID, not a mask.
* Sort #includes
* Move ->x86_platform_id comment
The platform ID vs. platform mask confusion meant that v1 worked by total accident. If you tested v1, I'd really appreciate you retest this as well.
--
There was a report[1] that CPUs running updated microcode were being reported as running old microcode. The reason is that the old microcode list neglects to take the platform ID into account.
The platform ID is an Intel-only construct that allows CPUs that otherwise have the same model/family/stepping to take different microcode revisions. The microcode loader itself already checks this. Only the recent "old_microcode" checker failed here.
Treat the platform ID as a peer of model/family/stepping. Store it in 'struct cpuinfo_x86', enable matching on it with with 'struct x86_cpu_id', and flesh out the 'old_microcode' list with it.
This fixes the report of an inaccurate, false positive in the 'old_microcode' vulnerability file.
1. https://lore.kernel.org/all/[email protected]/
arch/x86/include/asm/microcode.h | 2 arch/x86/include/asm/processor.h | 5 arch/x86/kernel/cpu/intel.c | 1 arch/x86/kernel/cpu/match.c | 3 arch/x86/kernel/cpu/microcode/intel-ucode-defs.h | 398 +++++++++++++---------- arch/x86/kernel/cpu/microcode/intel.c | 55 ++- include/linux/mod_devicetable.h | 2 7 files changed, 294 insertions(+), 172 deletions(-)