大网数据广告活动
服务器运维问答

How dangerous might it be - and what performance gains may be had - by turning vulnerability mitigations off on non-Internet facing servers?

· 52CE 我爱测

When a virtual machine Linux host server is non-Internet facing and is used exclusively on a LAN and is using a relatively well tested distribution like Proxmox, how dangerous would it be to turn off all vulnerability mitigations…

问题原文

原帖链接 · ylluminate · CC BY-SA 4.0

When a virtual machine Linux host server is non-Internet facing and is used exclusively on a LAN and is using a relatively well tested distribution like Proxmox, how dangerous would it be to turn off all vulnerability mitigations via the kernel arg mitigations=off?

Additionally, has anyone tested what kinds of performance gains might be seen by turning off all such mitigations?

This recently came to be a question for me when I saw this big hit that the retbleed mitigations create: https://www.phoronix.com/review/retbleed-benchmark

This line of thought extended to the curiosity of what may be the ramifications - both ill and positive - of removing all or some mitigations either via the above kernel argument or by individually turning off high-impact mitigations.

社区高分解答

原帖链接 · diya · CC BY-SA 4.0

The Linux kernel flag mitigations=[on|off] is a single toggle to easily enable/disable all available kernel mitigations for hardware vulnerabilities as listed here https://docs.kernel.org/admin-guide/hw-vuln/index.html

The impact of that depends of course entirely on your CPU:

  • When your CPU isn’t vulnerable to any of the known vulnerabilities, then none of the mitigations are applicable and the impact should effectively be zero.

  • When your CPU is vulnerable to some (are there even CPUs vulnerable to all of them?) the impact depends on which specific vulnerabilities and your workload.

As to a risk analysis, that also depends on your workload and user base.

On a virtualization host operated by public VPS provider, the guests are trusted less and much more likely to be malicious (or compromised) than I would expect on a internal virtualization host used exclusively by my colleagues.

For example on our virtualization hosts used for CI/CD pipelines and compute clusters, all the guests are short lived, get deployed from trusted images, run for up to a couple of hours and then get destroyed again. There we need all the performance we can get and disable the mitigations.

On a different shared cluster we host more classical server consolidation workloads; guests that get deployed there there can (and are more likely to) run “forever” rather than for hours. It has a mix of production and non-production workloads and the guests are managed by DevOps teams that are not all as diligent in patching and updating their systems and applications.
There the risk of a malicious or compromised guest is much higher, the possible reduced performance for specific workloads an acceptable trade-off and thus mitigations do get enabled there and we limit which CPU flags get exposed to the guests.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-11-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。