History

x86/microcode: Taint and warn on late loading

Warn before it is attempted and taint the kernel. Late loading microcode can lead to malfunction of the kernel when the microcode update changes behaviour. There is no way for the kernel to determine whether its safe or not.

Borislav Petkov committed 4 years ago

Commit d23d33e1 parent a77a94f1 file · +5 −0Browse files

Unified · Split

arch/x86/kernel/cpu/microcode/core.c+5−0
@@ -493,6 +493,9 @@ static int microcode_reload_late(void) · 492 unmodified lines
493493 {
494494 int ret;
495495
496+ pr_err("Attempting late microcode loading - it is dangerous and taints the kernel.\n");
497+ pr_err("You should switch to early loading, if possible.\n");
498+
496499 atomic_set(&late_cpus_in, 0);
497500 atomic_set(&late_cpus_out, 0);
498501
@@ -541,6 +544,8 @@ put: · 42 unmodified lines
541544 if (ret == 0)
542545 ret = size;
543546
547+ add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
548+
544549 return ret;
545550 }
546551

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t