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
493{493{
494 int ret;494 int ret;
495 495
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
496 atomic_set(&late_cpus_in, 0);499 atomic_set(&late_cpus_in, 0);
497 atomic_set(&late_cpus_out, 0);500 atomic_set(&late_cpus_out, 0);
498 501
@@ -541,6 +544,8 @@ put: · 42 unmodified lines
541 if (ret == 0)544 if (ret == 0)
542 ret = size;545 ret = size;
543 546
547 add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
548
544 return ret;549 return ret;
545}550}
546 551

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