]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ucode: properly include early only ucode
authorDaniel Molkentin <dmolkentin@suse.com>
Thu, 28 Mar 2019 12:46:35 +0000 (13:46 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 25 Oct 2019 09:39:16 +0000 (11:39 +0200)
Intel has notified us that some microcode updates are not safe
to be applied during runtime. To accomodate for that, microcode
files shipped by SUSE and openSUSE have an '.early' postfix such
that triggering

/sys/devices/system/cpu/microcode/reload

from a booted system cannot pick up the ucode by accident, while
still allowing the code to be picked up during initrd time.

This change is needed to make this scheme work also in a hostonly
situation.

Currently, this affects only 06-4f-01, which is now 06-4f-01.early.

If a distro does not change the filename, the behavior does not
change.

Reference: osc#1098915

dracut.sh

index b6ce6e56efd488c648403a37e6110f4e8739daeb..82a310788bb2b0f802f42b6555bbb4b2591030b2 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1695,6 +1695,7 @@ if [[ $early_microcode = yes ]]; then
                 if [[ $hostonly ]]; then
                     _src=$(get_ucode_file)
                     [[ $_src ]] || break
+                    [[ -r $_fwdir/$_fw/$_src ]] || _src="${_src}.early"
                     [[ -r $_fwdir/$_fw/$_src ]] || break
                 fi