我正在尝试在运行 Debian Stretch 的计算机上修补 Spectre 变体 2。我已经安装了该intel-microcode
软件包strech-backports
https://packages.debian.org/stretch-backports/intel-microcode
其中包括来自 Intel 的 2018-03-12 微代码更新。重新启动后我运行sudo dmesg | grep 'microcode'
并得到
[ 1.180101] microcode: sig=0x30678, pf=0x8, revision=0x831
[ 1.180418] microcode: Microcode Update Driver: v2.01
<[email protected]>, Peter Oruba
据我所知,这不是我的处理器的最新版本。我的处理器是 Intel Celeron N2840,属于 Bay Trail 系列。根据
https://newsroom.intel.com/wp-content/uploads/sites/11/2018/03/microcode-update-guidance.pdf
所有 Bay Trail 都应该获得微码更新,但没有一个修订版等于我的修订版。此外,spectre-meltdown-checker.sh
脚本说
CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
* Mitigated according to the /sys interface: YES (Mitigation: Full
generic retpoline - vulnerable module loaded)
* Mitigation 1
* Kernel is compiled with IBRS support: NO
* IBRS enabled and active: UNKNOWN
* Kernel is compiled with IBPB support: YES
* IBPB enabled and active: NO
* Mitigation 2
* Kernel has branch predictor hardening (arm): NO
* Kernel compiled with retpoline option: YES
* Kernel compiled with a retpoline-aware compiler: YES (kernel
reports full retpoline compilation)
> STATUS: VULNERABLE (IBRS+IBPB or retpoline+IBPB is needed to mitigate
the vulnerability)
如何确保微码更新已正确安装并使用?
几个小时后编辑
我在配备 Intel Core i5-5200U 处理器 (Broadwell) 的计算机上执行了上面概述的过程,也在 Debian Stretch 上。在那台计算机上,脚本显示“不易受攻击”,并且我有可以缓解 Spectre v2 的微代码。dmesg | grep 'microcode'
还表明我有上面链接的英特尔文档中提到的修订版。
我还在一台配备旧 Intel Core 2 Duo Penryn 处理器的计算机上执行了该过程,Intel 不会提供用于缓解 Spectre v2 的微代码。这是该计算机上脚本的结果
CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
* Mitigated according to the /sys interface: YES (Mitigation: Full generic retpoline)
* Mitigation 1
* Kernel is compiled with IBRS support: NO
* IBRS enabled and active: UNKNOWN
* Kernel is compiled with IBPB support: YES
* IBPB enabled and active: NO
* Mitigation 2
* Kernel has branch predictor hardening (arm): NO
* Kernel compiled with retpoline option: YES
* Kernel compiled with a retpoline-aware compiler: YES (kernel reports full retpoline compilation)
> STATUS: NOT VULNERABLE (Full retpoline is mitigating the vulnerability)
IBPB is considered as a good addition to retpoline for Variant 2 mitigation, but your CPU microcode doesn't support it
我将其解释为 reptoline 缓解了 Spectre v2(仅对内核的攻击,对吧?),但建议 IBPB 进行微代码更新。
我的第一台计算机(配备 Intel Celeron N2840 处理器的计算机)不应该有至少和我上一台电脑一样的reptoline缓解措施吗?难道不应该吗还有微码缓解作为中间计算机吗?
答案1
对于 Skylake 和更新的处理器,retpoline 不足以完全缓解 Spectre V2。我不清楚 Bay Trail 与几代桌面处理器相比如何,但它可能使用与 Skylake 类似的预测逻辑。
此外,尽管微代码指南 PDF 表示 Celeron Nxxxx 系列的微代码已经投入“生产”,但它们似乎并未包含在最新发布的 Linux 微代码文件中。还有人对此也很咸: https://communities.intel.com/thread/124308