|
|
1abd92 |
The microcode_ctl package contains microcode files (vendor-provided binary data
|
|
|
1abd92 |
and/or code in proprietary format that affects behaviour of a device) for Intel
|
|
|
1abd92 |
CPUs that may be loaded into the CPU during boot.
|
|
|
1abd92 |
|
|
|
1abd92 |
The microcode_ctl package contains provisions for some issues related
|
|
|
1abd92 |
to microcode loading. While those provisions are expected to suit most users,
|
|
|
1abd92 |
several knobs are available in order to provide ability to override the default
|
|
|
1abd92 |
behaviour.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
General behaviour
|
|
|
1abd92 |
=================
|
|
|
1abd92 |
In RHEL 7, there are currently two main handlers for CPU microcode update:
|
|
|
1abd92 |
* Early microcode update. It uses GenuineIntel.bin or AuthenticAMD.bin file
|
|
|
1abd92 |
placed at the beginning of an initramfs image
|
|
|
1abd92 |
(/boot/initramfs-KERNEL_VERSION.img, where "KERNEL_VERSION" is a kernel
|
|
|
1abd92 |
version in the same format as provided by "uname -r") as a source
|
|
|
1abd92 |
of microcode data, and is performed very early during the boot process
|
|
|
1abd92 |
(if the relevant microcode file is available in the aforementioned file).
|
|
|
1abd92 |
* On-demand (late) microcode update. It can be triggered by writing "1" to
|
|
|
1abd92 |
/sys/devices/system/cpu/microcode/reload file (provided my the "microcode"
|
|
|
1abd92 |
module). It relies on request_firmware infrastructure, which searches (and
|
|
|
1abd92 |
loads, if found) microcode from a file present in one of the following
|
|
|
1abd92 |
directories (in the search order):
|
|
|
1abd92 |
/lib/firmware/updates/KERNEL_VERSION/
|
|
|
1abd92 |
/lib/firmware/updates/
|
|
|
1abd92 |
/lib/firmware/KERNEL_VERSION/
|
|
|
1abd92 |
/lib/firmware/
|
|
|
1abd92 |
(there is also an additional directory that can be configured via the
|
|
|
1abd92 |
"fw_path_para" module option of the "firmware_class" module; as this module
|
|
|
1abd92 |
is built-in in RHEL kernel, a boot parameter "firmware_class.fw_path_para"
|
|
|
1abd92 |
should be used for that purpose; this is out of the document's scope, however)
|
|
|
1abd92 |
|
|
|
1abd92 |
The firmware for Intel CPUs is searched in "intel-ucode" subdirectory, and for
|
|
|
1abd92 |
AMD CPUs, a file under "amd-ucode" is searched.
|
|
|
1abd92 |
|
|
|
1abd92 |
For Intel CPUs, the name of the specific microcode file the kernel tries to load
|
|
|
1abd92 |
has the format "FF-MM-SS", where "FF" is the family number, "MM" is the model
|
|
|
1abd92 |
number, and "SS" is the stepping. All those numbers are zero-filled to two digits
|
|
|
1abd92 |
and are written in hexadecimal (letters are in the lower case). For AMD CPUs,
|
|
|
1abd92 |
the file name has the format "microcode_amd_famFFh.bin", where "FF" is the
|
|
|
1abd92 |
family number, written in hexadecimal, letters are in the lower case, not
|
|
|
1abd92 |
zero-filled.
|
|
|
1abd92 |
|
|
|
1abd92 |
The early microcode is placed into initramfs image by the "dracut" script, which
|
|
|
1abd92 |
scans the aforementioned subdirectories of the configured list of firmware
|
|
|
1abd92 |
directories (by default, the list consists of two directories in RHEL 7,
|
|
|
1abd92 |
"/lib/firmware/updates" and "/lib/firmware").
|
|
|
1abd92 |
|
|
|
1abd92 |
In RHEL 7, AMD CPU microcode is shipped as a part of the linux-firmware package,
|
|
|
1abd92 |
and Intel microcode is shipped as a part of the microcode_ctl package.
|
|
|
1abd92 |
|
|
|
1abd92 |
The microcode_ctl package currently includes the following:
|
|
|
1abd92 |
* Intel CPU microcode files, placed in /usr/share/microcode_ctl/intel-ucode
|
|
|
1abd92 |
directory (currently there are none);
|
|
|
1abd92 |
* A dracut module, /usr/lib/dracut/modules.d/99microcode_ctl-fw_dir_override,
|
|
|
1abd92 |
that controls which additional firmware directories will be added to dracut's
|
|
|
1abd92 |
default configuration;
|
|
|
1abd92 |
* A dracut configuration file, /usr/lib/dracut/dracut.conf.d/01-microcode.conf,
|
|
|
1abd92 |
that enables inclusion of early microcode to the generated initramfs
|
|
|
1abd92 |
in dracut;
|
|
|
1abd92 |
* A dracut configuration file,
|
|
|
1abd92 |
/usr/lib/dracut/dracut.conf.d/99-microcode-override.conf, that provides a way
|
|
|
1abd92 |
to quickly disable 99microcode_ctl-fw_dir-override dracut module;
|
|
|
1abd92 |
* A systemd service file, microcode.service, that triggers microcode reload
|
|
|
1abd92 |
late during boot;
|
|
|
1abd92 |
* A set of directories in /usr/share/microcode_ctl/ucode_with_caveats, each
|
|
|
1abd92 |
of which contains configuration and related data for various caveats related
|
|
|
1abd92 |
to microcode:
|
|
|
1abd92 |
* readme - description of caveat and related information,
|
|
|
1abd92 |
* config - caveat configuration file, with syntax as described in "Caveat
|
|
|
1abd92 |
configuration" section below,
|
|
|
1abd92 |
* intel-ucode - directory containing microcode files related to the caveat;
|
|
|
1abd92 |
* A set of support scripts, placed in /usr/libexec/microcode_ctl:
|
|
|
1abd92 |
* "check_caveats" is an utility script that performs checks of the target
|
|
|
1abd92 |
kernel (and running CPU) in accordance with caveat configuration files
|
|
|
1abd92 |
in ucode_with_caveats directory and reports whether it passes them or not,
|
|
|
1abd92 |
* "reload_microcode" is a script that is called by microcode.service and
|
|
|
1abd92 |
triggers microcode reloading (by writing "1" to
|
|
|
1abd92 |
/sys/devices/system/cpu/microcode/reload) if the running kernel passes
|
|
|
1abd92 |
check_caveats checks,
|
|
|
1abd92 |
* "update_ucode" is a script that populates symlinks to microcode files
|
|
|
1abd92 |
in /lib/firmware, so it can be picked up by relevant kernels for the late
|
|
|
1abd92 |
microcode loading.
|
|
|
1abd92 |
|
|
|
1abd92 |
Also, microcode_ctl RPM includes triggers that run update_ucode script on every
|
|
|
1abd92 |
installation or removal of a kernel RPM in order to provide microcode files
|
|
|
1abd92 |
for newly installed kernels and cleanup symlinks for the uninstalled ones.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
Caveat configuration
|
|
|
1abd92 |
--------------------
|
|
|
1abd92 |
There is a directory for each caveat under
|
|
|
1abd92 |
/usr/share/microcode_ctl/ucode_with_caveats, containing the following files:
|
|
|
1abd92 |
* "config", a configuration file for the caveat;
|
|
|
1abd92 |
* "readme", that contains description of the caveat;
|
|
|
1abd92 |
* set of related associated microcode files.
|
|
|
1abd92 |
|
|
|
1abd92 |
"config" file is a set of lines each containing option name and its value,
|
|
|
1abd92 |
separated by white space. Currently, the following options are supported:
|
|
|
1abd92 |
* "model" option, which has format "VENDOR_ID FF-MM-SS", that specifies
|
|
|
1abd92 |
to which CPU model the caveat is applicable (check_caveats ignores caveats
|
|
|
1abd92 |
with non-matching models if "-m" option is passed to it). Can be set
|
|
|
1abd92 |
in the configuration file only once (the last provided value is used).
|
|
|
1abd92 |
* "vendor" option specifies CPUs of which vendor (as provided
|
|
|
1abd92 |
in the /proc/cpuinfo file) the caveat is applicable to (check_caveats
|
|
|
1abd92 |
ignores caveats with non-matching models when it is invoked with "-m"
|
|
|
1abd92 |
option). Can be set in the configuration file only once.
|
|
|
1abd92 |
* "path" is a glob pattern that specifies set of microcode files associated
|
|
|
1abd92 |
with the caveat as a relative path to the caveat directory. This option
|
|
|
1abd92 |
is used for populating files in /lib/firmware by update_ucode script and
|
|
|
1abd92 |
for matching microcode file when dracut is run in host-only mode
|
|
|
1abd92 |
(as in that case it uses only the first directory in firmware directory list
|
|
|
1abd92 |
to look for the microcode file applicable to the host CPU). Can be set
|
|
|
1abd92 |
in the configuration file multiple times.
|
|
|
1abd92 |
* "kernel" is a minimal kernel version that supports proper handling
|
|
|
1abd92 |
of the related microcode files during late microcode load. It may be
|
|
|
1abd92 |
provided in one of the following formats that affect the way it is compared
|
|
|
1abd92 |
to the running kernel version:
|
|
|
1abd92 |
* A.B.C (where A, B, and C are decimal numbers), "upstream version". In this
|
|
|
1abd92 |
case, simple version comparison against the respective part of the running
|
|
|
1abd92 |
kernel version is used, and the running kernel version should be greater
|
|
|
1abd92 |
or equal than the version provided in the configuration option in order
|
|
|
1abd92 |
for comparison to succeed (that is, the first part, major version number,
|
|
|
1abd92 |
of the running kernel version should be greater than the value provided
|
|
|
1abd92 |
in the configuration option, or those should be equal and the second part,
|
|
|
1abd92 |
minor version number, should be greater than the minor version number
|
|
|
1abd92 |
of the kernel version provided in the configuration option, or the first
|
|
|
1abd92 |
two parts should be equal and the third part, patch level, should
|
|
|
1abd92 |
be greater or equal the patch level of the version in the configuration
|
|
|
1abd92 |
option).
|
|
|
1abd92 |
* A.B.C-Y (where A, B, C, and Y are decimal numbers), "Y-stream version".
|
|
|
1abd92 |
In this case, A.B.C part should be equal, and Y part of the running kernel
|
|
|
1abd92 |
version should be greater or equal than the Y part of the configuration
|
|
|
1abd92 |
option version in order to satisfy the comparison requirement.
|
|
|
1abd92 |
* A.B.C-Y.Z1.Z2 (where A, B, C, Y, Z1, and Z2 are decimal numbers),
|
|
|
1abd92 |
"Z-stream version". In this case, A.B.C-Y part should be equal and Z1.Z2
|
|
|
1abd92 |
part of the running kernel should be greater or equal than the respective
|
|
|
1abd92 |
part of the configuration option version (when compared as a version)
|
|
|
1abd92 |
for comparison to succeed.
|
|
|
1abd92 |
Kernel version check passed if at least one comparison of the running kernel
|
|
|
1abd92 |
version against a kernel version provided in a configuration option
|
|
|
1abd92 |
succeeded. The "kernel" configuration option can be provided
|
|
|
1abd92 |
in the configuration file multiple times.
|
|
|
1abd92 |
* "kernel_early" is a minimal kernel version that supports proper handling
|
|
|
1abd92 |
of the related microcode during early microcode load. The format of the
|
|
|
1abd92 |
option and its semantics is similar to the "kernel" configuration options.
|
|
|
1abd92 |
This option can be provided multiple times as well.
|
|
|
1abd92 |
* "mc_min_ver_late" is the minimal version of the currently loaded microcode
|
|
|
1abd92 |
on the CPU (as reported in /proc/cpuinfo) that supports late microcode
|
|
|
1abd92 |
update. Microcode update will be attempted only if the currently loaded
|
|
|
1abd92 |
microcode version is greater or equal the microcode version provided
|
|
|
1abd92 |
in the configuration option. Can be set in the configuration file only once.
|
|
|
1abd92 |
* "disable" is a way to disable a specific caveat from inside its
|
|
|
1abd92 |
configuration. Argument for the argument is a list of stages ("early",
|
|
|
1abd92 |
"late") for which the caveat should be disable. The configuration option
|
|
|
1abd92 |
can be provided multiple times in a configuration file.
|
|
|
1abd92 |
* "blacklist" is a marker for a start of list of blacklisted model names,
|
|
|
1abd92 |
one model name per line. The model name of the running CPU (as reported
|
|
|
1abd92 |
in /proc/cpuinfo) is compared against the names in the provided list, and,
|
|
|
1abd92 |
if there is a match, caveat check fails.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
check_caveats script
|
|
|
1abd92 |
--------------------
|
|
|
1abd92 |
"check_caveats" is an utility script (called by update_ucode, reload_microcode,
|
|
|
1abd92 |
dracut module) that performs checks of the target kernel (and running CPU)
|
|
|
1abd92 |
in accordance with caveat configuration files in directory
|
|
|
1abd92 |
"/usr/share/microcode_ctl/ucode_with_caveats", and returns information, whether
|
|
|
1abd92 |
the system passes the checks, or not.
|
|
|
1abd92 |
|
|
|
1abd92 |
Usage:
|
|
|
1abd92 |
check_caveats [-e] [-k TARGET_KVER] [-c CONFIG]* [-m] [-v]'
|
|
|
1abd92 |
|
|
|
1abd92 |
Options:
|
|
|
1abd92 |
-e - check for early microcode load possibility (instead of late microcode
|
|
|
1abd92 |
load). "kernel_early" caveat configuration options are used for checking
|
|
|
1abd92 |
instead of "kernel", and "mc_min_ver_late" is not checked.
|
|
|
1abd92 |
-k - target kernel version to check against, $(uname -r) is used otherwise.
|
|
|
1abd92 |
-c - caveat(s) to check, all caveat configurations found inside
|
|
|
1abd92 |
$MC_CAVEATS_DATA_DIR are checked otherwise.
|
|
|
1abd92 |
-m - ignore caveats that do not apply to the current CPU model.
|
|
|
1abd92 |
-v - verbose output.
|
|
|
1abd92 |
|
|
|
1abd92 |
Environment:
|
|
|
1abd92 |
MC_CAVEATS_DATA_DIR - directory that contains caveats configurations,
|
|
|
1abd92 |
"/usr/share/microcode_ctl/ucode_with_caveats"
|
|
|
1abd92 |
by default.
|
|
|
1abd92 |
FW_DIR - directory containing firmware files (per-kernel configuration
|
|
|
1abd92 |
overrides are checked there), "/lib/firmware" by default.
|
|
|
1abd92 |
CFG_DIR - directory containing global caveats overrides,
|
|
|
1abd92 |
"/etc/microcode_ctl/ucode_with_caveats" by default.
|
|
|
1abd92 |
|
|
|
1abd92 |
Output:
|
|
|
1abd92 |
Script returns information about caveats check results. Output has a format
|
|
|
1abd92 |
of "KEY VALUE1 VALUE2 ..." with KEY defining the semantics of the VALUEs.
|
|
|
1abd92 |
Currently, the following data is issued:
|
|
|
1abd92 |
- "cfgs" - list of caveats that have been processed (and not skipped
|
|
|
1abd92 |
due to missing "config", "readme", or a disallow-* override described
|
|
|
1abd92 |
below);
|
|
|
1abd92 |
- "skip_cfgs" - list of caveats that have been skipped (due to missing
|
|
|
1abd92 |
config/readme file, or because of overrides);
|
|
|
1abd92 |
- "paths" - list of glob patterns matching files associated with caveats
|
|
|
1abd92 |
that have been processed;
|
|
|
1abd92 |
- "ok_cfgs" - list of caveat configurations that have all the checks passed
|
|
|
1abd92 |
(or have enforced by one of force-* overrides described below);
|
|
|
1abd92 |
- "ok_paths" - list of glob patterns associated with caveat files from
|
|
|
1abd92 |
the "ok_cfgs" list;
|
|
|
1abd92 |
- "fail_cfgs" - list of caveats that have one of the checks failed.
|
|
|
1abd92 |
- "fail_paths" - list of glob patterns associated with caveats from the
|
|
|
1abd92 |
"fail_cfgs" list.
|
|
|
1abd92 |
|
|
|
1abd92 |
Return value:
|
|
|
1abd92 |
- 0 in case caveats check has passed, 1 otherwise.
|
|
|
1abd92 |
- In "-d" mode, 0 is always returned.
|
|
|
1abd92 |
|
|
|
1abd92 |
Overrides:
|
|
|
1abd92 |
|
|
|
1abd92 |
When check_caveats perform its checks, it also checks for presence of files
|
|
|
1abd92 |
in specific places, and, if they exist, check_caveats skips a caveat or ignores
|
|
|
1abd92 |
its checks; that mechanism allows overriding the information provided
|
|
|
1abd92 |
in configuration on local systems and affect the behaviour of the microcode
|
|
|
1abd92 |
update process.
|
|
|
1abd92 |
|
|
|
1abd92 |
Current list of overrides (where $FW_DIR and $CFG_DIR are the environment
|
|
|
1abd92 |
options described earlier; $kver - the currently processed kernel version,
|
|
|
1abd92 |
$s is the requested stage ("early" or "late"), $cfg is the caveat directory
|
|
|
1abd92 |
name):
|
|
|
1abd92 |
$FW_DIR/$kver/disallow-$s-$cfg - skip a caveat for the requested stage for
|
|
|
1abd92 |
a specific kernel version..
|
|
|
1abd92 |
$FW_DIR/$kver/force-$s-$cfg - apply a specific caveat file for a specific
|
|
|
1abd92 |
kernel version for the requested stage without
|
|
|
1abd92 |
performing any checks.
|
|
|
1abd92 |
$FW_DIR/$kver/disallow-$cfg - skip a caveat for any stage for a specific
|
|
|
1abd92 |
kernel version.
|
|
|
1abd92 |
$FW_DIR/$kver/force-$cfg - apply a specific caveat for any stage
|
|
|
1abd92 |
for a specific kernel version without checks.
|
|
|
1abd92 |
$FW_DIR/$kver/disallow-$s - skip all caveats for a specific stage
|
|
|
1abd92 |
for a specific kernel version.
|
|
|
1abd92 |
$CFG_DIR/disallow-$s-$cfg - skip a caveat for a specific stage for all
|
|
|
1abd92 |
kernel versions.
|
|
|
1abd92 |
$FW_DIR/$kver/force-$s - apply all caveats for a specific stage
|
|
|
1abd92 |
for a specific kernel version without checks.
|
|
|
1abd92 |
$CFG_DIR/force-$s-$cfg - apply a specific caveat for a specific stage for
|
|
|
1abd92 |
all kernel versions without checks.
|
|
|
1abd92 |
$FW_DIR/$kver/disallow - skip all caveats for all stages for a specific
|
|
|
1abd92 |
kernel version.
|
|
|
1abd92 |
$CFG_DIR/disallow-$cfg - skip a caveat for all stages for all kernel
|
|
|
1abd92 |
versions.
|
|
|
1abd92 |
$FW_DIR/$kver/force - apply all caveats for all stages for a specific kernel
|
|
|
1abd92 |
version without checks.
|
|
|
1abd92 |
$CFG_DIR/force-$cfg - apply a caveat for all stages for all kernel versions
|
|
|
1abd92 |
without checks.
|
|
|
1abd92 |
$CFG_DIR/disallow-$s - skip all caveat for all kernel versions
|
|
|
1abd92 |
for a specific stage.
|
|
|
1abd92 |
$CFG_DIR/force-$s - apply all caveats for all kernel versions for specific
|
|
|
1abd92 |
stage without checks.
|
|
|
1abd92 |
$CFG_DIR/disallow - skip all caveats for all stages for all kernel versions
|
|
|
1abd92 |
(disable everything).
|
|
|
1abd92 |
$CFG_DIR/force - force all caveats for all stages for all kernel versions
|
|
|
1abd92 |
(enable everything).
|
|
|
1abd92 |
|
|
|
1abd92 |
The "apply" action above means creating symlinks in /lib/firmware by
|
|
|
1abd92 |
update_ucode in case of the "late" stage and adding caveat directory to the list
|
|
|
1abd92 |
of firmware directories by dracut plugin in case of the "early" stage.
|
|
|
1abd92 |
|
|
|
1abd92 |
The files are checked for existence until the first match, so more specific
|
|
|
1abd92 |
overrides can override more broad ones.
|
|
|
1abd92 |
|
|
|
1abd92 |
Also, a caveat is ignored if it lacks either config or readme file.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
update_ucode script
|
|
|
1abd92 |
-------------------
|
|
|
1abd92 |
"update_ucode" populates symlinks to microcode files in accordance with caveats
|
|
|
1abd92 |
configuration. It enables late microcode loading that is invoked by triggering
|
|
|
1abd92 |
/sys/devices/system/cpu/microcode/reload file. Since caveats depend
|
|
|
1abd92 |
on the kernel version, symlinks are populated inside
|
|
|
1abd92 |
"/lib/firmware/KERNEL_VERSION" directory for each installed kernel.
|
|
|
1abd92 |
As a consequence, this script is triggered upon each kernel package installation
|
|
|
1abd92 |
and removal.
|
|
|
1abd92 |
|
|
|
1abd92 |
The script has two parts: common and kernel-version-specific.
|
|
|
1abd92 |
|
|
|
1abd92 |
During the common part, files are populated from
|
|
|
1abd92 |
/usr/share/microcode_ctl/intel-ucode in /lib/firmware/intel-ucode. There are
|
|
|
1abd92 |
several possibilities to affect the process:
|
|
|
1abd92 |
* Presence of "/etc/microcode_ctl/intel-ucode-disallow" file leads to skipping
|
|
|
1abd92 |
the common part of the script.
|
|
|
1abd92 |
* The same for "/lib/firmware/intel-ucode-disallow".
|
|
|
1abd92 |
|
|
|
1abd92 |
During the kernel-version-specific part, each caveat is checked against every
|
|
|
1abd92 |
kernel version, and those combinations, for which caveat check succeeds,
|
|
|
1abd92 |
gets the symlinks to the associated microcode files populated.
|
|
|
1abd92 |
* Absence of "/lib/firmware/KERNEL_VERSION/readme-CAVEAT" prevents update_ucode
|
|
|
1abd92 |
from removing symlinks related to the caveat for specific kernel version.
|
|
|
1abd92 |
* Since the check is being done by check_caveats, all the overrides that
|
|
|
1abd92 |
described there also stay.
|
|
|
1abd92 |
|
|
|
1abd92 |
Usage:
|
|
|
1abd92 |
update_ucode [--action {add|remove|refresh|list}] [--kernel KERNELVER]*
|
|
|
1abd92 |
[--verbose] [--dry-run] [--cleanup intel_ucode caveats_ucode]
|
|
|
1abd92 |
[--skip-common] [--skip-kernel-specific]
|
|
|
1abd92 |
|
|
|
1abd92 |
Options:
|
|
|
1abd92 |
--action - action to perform. Currently, the following actions are supported:
|
|
|
1abd92 |
* "add" - create new symlinks.
|
|
|
1abd92 |
* "remove" - remove old symlinks that are no longer needed.
|
|
|
1abd92 |
* "refresh" - re-populate symlinks.
|
|
|
1abd92 |
* "list" - list files under control of update_ucode.
|
|
|
1abd92 |
By default, "refresh" action is executed.
|
|
|
1abd92 |
--kernel - kernel version to process. By default, list of kernel versions
|
|
|
1abd92 |
is formed based on contents of /lib/firmware and /lib/modules
|
|
|
1abd92 |
directories.
|
|
|
1abd92 |
--verbose - verbose output.
|
|
|
1abd92 |
--dry-run - do not call commands, just print the invocation lines.
|
|
|
1abd92 |
--cleanup - cleanup mode. Used by post-uninstall script during package
|
|
|
1abd92 |
upgrades. Removes excess files in accordance to the contents
|
|
|
1abd92 |
of the files provided in the arguments to the option.
|
|
|
1abd92 |
--skip-common - do not process /lib/firmware directory.
|
|
|
1abd92 |
--skip-kernel-specific - do not process /lib/firmware/KERNEL_VERSION
|
|
|
1abd92 |
directories.
|
|
|
1abd92 |
|
|
|
1abd92 |
Return value:
|
|
|
1abd92 |
0 on success, 1 on error.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
reload_microcode script
|
|
|
1abd92 |
-----------------------
|
|
|
1abd92 |
"reload_microcode" is a script that is called by microcode.service and
|
|
|
1abd92 |
triggers late microcode reloading (by writing "1" to
|
|
|
1abd92 |
/sys/devices/system/cpu/microcode/reload) if the following check are passed:
|
|
|
1abd92 |
* the microcode update performed not in a virtualised environment;
|
|
|
1abd92 |
* running kernel passes "check_caveats" checks that applicable to the current
|
|
|
1abd92 |
CPU model.
|
|
|
1abd92 |
|
|
|
1abd92 |
For a virtualised environment check, the script searches the "/proc/cpuinfo"
|
|
|
1abd92 |
file for presence of the "hypervisor" flag among CPU features (it corresponds
|
|
|
1abd92 |
to a CPUID feature bit set by hypervisors in order to inform that the kernel
|
|
|
1abd92 |
operates inside a virtual machine). This check can be overridden and skipped
|
|
|
1abd92 |
by creation of a file "/etc/microcode_ctl/ignore-hypervisor-flag".
|
|
|
1abd92 |
|
|
|
1abd92 |
The script has no options and always returns 0.
|
|
|
1abd92 |
|
|
|
1abd92 |
In addition to overrides that affect check_caveats, the presence of the
|
|
|
1abd92 |
"/etc/microcode_ctl/ignore-hypervisor-flag" flag provides an ability
|
|
|
1abd92 |
to skip "hypervisor" flag check.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
99microcode_ctl-fw_dir_override dracut module
|
|
|
1abd92 |
---------------------------------------------
|
|
|
1abd92 |
This dracut module injects directories with microcode files for caveats
|
|
|
1abd92 |
that pass "early" check_caveats check (with "-e" flag). In addition
|
|
|
1abd92 |
to "check_caveats" overrides, the following abilities to control module's
|
|
|
1abd92 |
behaviour are present:
|
|
|
1abd92 |
* Presence of one of the following files:
|
|
|
1abd92 |
- /etc/microcode_ctl/ucode_with_caveats/skip-host-only-check
|
|
|
1abd92 |
- /etc/microcode_ctl/ucode_with_caveats/skip-host-only-check-$cfg
|
|
|
1abd92 |
- /lib/firmware/$kver/skip-host-only-check
|
|
|
1abd92 |
- /lib/firmware/$kver/skip-host-only-check-$cfg
|
|
|
1abd92 |
(where "$kver" is the kernel version in question and "$cfg" is the caveat
|
|
|
1abd92 |
directory name) allows skipping matching of microcode file name when dracut's
|
|
|
1abd92 |
Host-Only mode is enabled.
|
|
|
1abd92 |
|
|
|
1abd92 |
When caveats_check succeeds, caveats directory (not its possibly populated
|
|
|
1abd92 |
version for late microcode update: "/lib/firmware/KERNEL_VERSION";
|
|
|
1abd92 |
it is done so in order
|
|
|
1abd92 |
to have ability to configure list of caveats enabled for early and late
|
|
|
1abd92 |
microcode update, independently) is added to dracut's list of firmware search
|
|
|
1abd92 |
directories.
|
|
|
1abd92 |
|
|
|
1abd92 |
The module can be disabled by running dracut with
|
|
|
1abd92 |
"-o microcode_ctl-fw_dir_override" (for one-time exclusion), or it can
|
|
|
1abd92 |
be disabled permanently by uncommenting string
|
|
|
1abd92 |
"omit_dracutmodules+=' microcode_ctl-fw_dir_override '" in
|
|
|
1abd92 |
/usr/lib/dracut/dracut.conf.d/99-microcode-override.conf configuration file.
|
|
|
1abd92 |
|
|
|
1abd92 |
See dracut(8), section "Omitting dracut Modules", and dracut.conf(5), variable
|
|
|
1abd92 |
"omit_dracutmodules" for additional information.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
Caveats
|
|
|
1abd92 |
=======
|
|
|
1abd92 |
|
|
|
1abd92 |
Intel Broadwell-EP/EX ("BDX-ML B/M/R0") caveat
|
|
|
1abd92 |
----------------------------------------------
|
|
|
1abd92 |
Microcode update process on Intel Broadwell-EP/EX CPUs (BDX-ML B/M/R0,
|
|
|
1abd92 |
family 6, model 79, stepping 1) has issues that lead to system instability.
|
|
|
1abd92 |
A series of changes for the Linux kernel has been developed in order to work
|
|
|
1abd92 |
around those issues; however, as it turned out, some systems have issues even
|
|
|
1abd92 |
when a microcode update performed on a kernel that contains those changes.
|
|
|
1abd92 |
As a result, microcode update for this CPU model is disabled by default;
|
|
|
1abd92 |
the microcode file, however, is still shipped as a part of microcode_ctl
|
|
|
1abd92 |
package and can be used for performing a microcode update if it is enforced
|
|
|
533a6a |
via the aforementioned overrides. (See the sections "check_caveats script"
|
|
|
1abd92 |
and "reload_microcode script" for details.)
|
|
|
1abd92 |
|
|
|
533a6a |
Caveat name: intel-06-4f-01
|
|
|
533a6a |
|
|
|
1abd92 |
Affected microcode: intel-ucode/06-4f-01.
|
|
|
1abd92 |
|
|
|
1abd92 |
Mitigation: microcode loading is disabled for the affected CPU model.
|
|
|
1abd92 |
|
|
|
1abd92 |
Minimum versions of the kernel package that contain the aforementioned patch
|
|
|
1abd92 |
series:
|
|
|
1abd92 |
- Upstream/RHEL 8: 4.17.0
|
|
|
1abd92 |
- RHEL 7.6 onwards: 3.10.0-894
|
|
|
1abd92 |
- RHEL 7.5: 3.10.0-862.6.1
|
|
|
1abd92 |
- RHEL 7.4: 3.10.0-693.35.1
|
|
|
1abd92 |
- RHEL 7.3: 3.10.0-514.52.1
|
|
|
1abd92 |
- RHEL 7.2: 3.10.0-327.70.1
|
|
|
1abd92 |
- RHEL 6.10: 2.6.32-754.1.1
|
|
|
1abd92 |
- RHEL 6.7: 2.6.32-573.58.1
|
|
|
1abd92 |
- RHEL 6.6: 2.6.32-504.71.1
|
|
|
1abd92 |
- RHEL 6.5: 2.6.32-431.90.1
|
|
|
1abd92 |
- RHEL 6.4: 2.6.32-358.90.1
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
Early microcode load inside a virtual machine
|
|
|
1abd92 |
---------------------------------------------
|
|
|
1abd92 |
RHEL 7 kernel supports performing microcode update during early boot stage
|
|
|
1abd92 |
from a cpio archive placed at the beginning of the initramfs image. However,
|
|
|
1abd92 |
when an early microcode update is attempted inside some virtualised
|
|
|
1abd92 |
environments, that may result in unexpected system behaviour.
|
|
|
1abd92 |
|
|
|
533a6a |
Caveat name: intel
|
|
|
533a6a |
|
|
|
1abd92 |
Affected microcode: all.
|
|
|
1abd92 |
|
|
|
533a6a |
Mitigation: early microcode loading is disabled for all CPU models on kernels
|
|
|
533a6a |
without the fix.
|
|
|
1abd92 |
|
|
|
1abd92 |
Minimum versions of the kernel package that contain the fix:
|
|
|
1abd92 |
- Upstream/RHEL 8: 4.10.0
|
|
|
1abd92 |
- RHEL 7.6 onwards: 3.10.0-930
|
|
|
1abd92 |
- RHEL 7.5: 3.10.0-862.14.1
|
|
|
1abd92 |
- RHEL 7.4: 3.10.0-693.38.1
|
|
|
1abd92 |
- RHEL 7.3: 3.10.0-514.57.1
|
|
|
1abd92 |
- RHEL 7.2: 3.10.0-327.73.1
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
1abd92 |
Intel Sandy Bridge-E/EN/EP caveat
|
|
|
1abd92 |
---------------------------------
|
|
|
1abd92 |
MDS-related microcode revision 0x718 for Intel Sandy Bridge-E/EN/EP
|
|
|
1abd92 |
(SNB-EP, family 6, model 45, stepping 7) may lead to system instability.
|
|
|
1abd92 |
In order to address this, this microcode update is not used and the previous
|
|
|
1abd92 |
microcode revision is provided instead by default; the microcode file, however,
|
|
|
1abd92 |
is still shipped as part of microcode_ctl package and can be used for performing
|
|
|
533a6a |
a microcode update if it is enforced via the aforementioned overrides. (See
|
|
|
533a6a |
the sections "check_caveats script" and "reload_microcode script" for details.)
|
|
|
533a6a |
|
|
|
533a6a |
Caveat name: intel-06-2d-07
|
|
|
1abd92 |
|
|
|
1abd92 |
Affected microcode: intel-ucode/06-2d-07.
|
|
|
1abd92 |
|
|
|
1abd92 |
Mitigation: previously published microcode revision 0x714 is used by default.
|
|
|
1abd92 |
|
|
|
1abd92 |
|
|
|
533a6a |
Intel Skylake-SP/W/X caveat
|
|
|
533a6a |
---------------------------
|
|
|
533a6a |
Microcode revision 0x2000065 for Intel Skylake Scalable Platform (SKL-SP/W/X,
|
|
|
533a6a |
family 6, model 85, stepping 4) may lead to system instability.
|
|
|
533a6a |
In order to address this, this microcode update is not used and the previous
|
|
|
533a6a |
microcode revision is provided instead by default; the microcode file, however,
|
|
|
533a6a |
is still shipped as part of microcode_ctl package and can be used for performing
|
|
|
533a6a |
a microcode update if it is enforced via the aforementioned overrides.
|
|
|
533a6a |
(See the sections "check_caveats script" and "reload_microcode script"
|
|
|
533a6a |
for details.)
|
|
|
533a6a |
|
|
|
533a6a |
Caveat name: intel-06-55-04
|
|
|
533a6a |
|
|
|
533a6a |
Affected microcode: intel-ucode/06-55-04.
|
|
|
533a6a |
|
|
|
533a6a |
Mitigation: previously published microcode revision 0x2000064 is used
|
|
|
533a6a |
by default.
|
|
|
533a6a |
|
|
|
533a6a |
|
|
|
1abd92 |
|
|
|
1abd92 |
Additional information
|
|
|
1abd92 |
======================
|
|
|
1abd92 |
Red Hat provides updated microcode, developed by its microprocessor partners,
|
|
|
1abd92 |
as a customer convenience. Please contact your hardware vendor to determine
|
|
|
1abd92 |
whether more recent BIOS/firmware updates are recommended because additional
|
|
|
1abd92 |
improvements may be available.
|
|
|
1abd92 |
|
|
|
1abd92 |
Information regarding microcode revisions required for mitigating specific
|
|
|
533a6a |
Intel CPU vulnerabilities is available in the following knowledge base articles:
|
|
|
1abd92 |
* CVE-2017-5715 ("Spectre"):
|
|
|
1abd92 |
https://access.redhat.com/articles/3436091
|
|
|
1abd92 |
* CVE-2018-3639 ("Speculative Store Bypass"):
|
|
|
1abd92 |
https://access.redhat.com/articles/3540901
|
|
|
1abd92 |
* CVE-2018-3620, CVE-2018-3646 ("L1 Terminal Fault Attack"):
|
|
|
1abd92 |
https://access.redhat.com/articles/3562741
|
|
|
1abd92 |
* CVE-2018-12130, CVE-2018-12126, CVE-2018-12127, and CVE-2019-11091
|
|
|
1abd92 |
("Microarchitectural Data Sampling"):
|
|
|
1abd92 |
https://access.redhat.com/articles/4138151
|
|
|
533a6a |
* CVE-2019-0117 (Intel SGX Information Leak),
|
|
|
533a6a |
CVE-2019-0123 (Intel SGX Privilege Escalation),
|
|
|
533a6a |
CVE-2019-11135 (TSX Asynchronous Abort),
|
|
|
533a6a |
CVE-2019-11139 (Voltage Setting Modulation):
|
|
|
533a6a |
https://access.redhat.com/solutions/2019-microcode-nov
|