The Performance Impact Of Intel's Register File Data Sampling "RFDS" Mitigation
Earlier this week on Patch Tuesday was the disclosure by Intel of the Register File Data Sampling (RFDS) vulnerability and mitigation via updated CPU microcode and a kernel patch. RFDS is around malicious user-space software potentially being able to infer stale register values from kernel space. Register File Data Sampling affects recent Intel Atom / E-core bearing processors including the latest Raptor Lake Refresh processors. In this article are some initial benchmarks of the RFDS performance impact under Linux when using the Core i9 14900K processor.
The mitigation for the Intel Register File Data Sampling vulnerability is to wait until the kernel is about to return to user-space and using the VERW instruction to clear the register file. For KVM virtualization use VERW is also used before VM entry. This affects Goldmont and Tremont and Gracemont cores along with the E cores found on Alder Lake and Raptor Lake processors.
The mitigation of RFDS requires both having the new Intel CPU microcode deployed on your system as well as a patched Linux kernel. On patched kernels via the sysfs vulnerabilities the "reg_file_data_sampling" attribute (/sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling) is added to indicate if the mitigation is applied or if not affected or if missing the CPU microcode.
On patched systems, the "reg_file_data_sampling=" kernel option is added if wanting to use reg_file_data_sampling=off to force-disable the Register File Data Sampling mitigation.
For today's initial benchmarking of the RFDS mitigation, a Linux Git kernel build as of Wednesday was used along with the latest CPU microcode. The Intel Core i9 14900K desktop processor was tested in its default mitigated state and then repeating a variety of benchmarks while running in the reg_file_data_sampling=off mode for keeping all other mitigations at their defaults but having this new RFDS mitigation disabled. So let's take a look to see what the RFDS mitigation means for the Intel Raptor Lake (Refresh) performance.