قالب وردپرس درنا توس
Home / Technology / Benchmark AMD Zen 3 with predictive store-and-forward disabled

Benchmark AMD Zen 3 with predictive store-and-forward disabled



In the past week, AMD released a security analysis of AMD Zen 3’s new predictive store-and-forward (PSF) function. They do admit that there is a faulty PSF function that may lead to the possibility of side-channel attacks, despite the low level of exposure in the real world. In any case, they allow interested users to disable the Predictive Store Forwarding function, but what they did not mention in the white paper is how much performance overhead is expected if PSF is disabled. Therefore, my Easter weekend became the AMD Zen 3 PSF benchmark.

AMD does not recommend that end users disable the Protective Store Forwarding feature of Zen 3, but proactively conduct public safety analysis and ensure that its interested customers understand its behavior and how to disable it. The impact of bad PSF speculation will be similar to Spectre variant four/speculative storage bypass. AMD’s PSF security analysis points out:Customers who use software that implements the sandbox and are concerned about PSF behavior on AMD Zen3 processors can choose to disable the PSF function.

If there are Speculative Storage Bypass Disabling (SSBD) mitigations, or if PS3 is selectively forcibly disabled through different bits, you can disable PSF using Zen 3 CPU. AMD’s white paper says that they are releasing Linux patches to easily disable PSF when needed, but as of this writing, I have not seen these public patches. Presumably, they will be successful in the next few days in order to use the convenient “nopsfd”

; kernel option. However, for the purpose of the first test this weekend, I just built a kernel that sets MSR 48h Bit 7 to disable this Predictive Store Forwarding feature. By default, Linux will not mitigate SSBD unless opted in through the prctl interface or SECCOMP.

Since I don’t understand the performance impact of disabling predictive store-and-forward, I don’t know what to expect this weekend. I ran it on several different AMD Ryzen 5000 and EPYC 7003 series systems using the default kernel and then using the same kernel. Many benchmarks test cores/configurations, but PSF is disabled via bit 7.

On multiple systems and various workloads that have been tested, the Phoronix Test Suite automatically runs each test multiple times and so on. In the end, the difference in the results of disabling PSF is very small. In the span of multiple runs and multiple systems, at most close to 1% of the impact in some workloads, but overall it is difficult to find any statistically significant differences.

For example, this set of results using the Ryzen 7 5800X box exceeds 100 tests. When this new Zen 3 feature is disabled, the geometric mean of all these results is less than half of the performance loss. The other result files are even more boring than this.

For such a long story, even if AMD does not recommend that our customers disable Predictive Store Forwarding, if you decide to disable it in the name of improving security, it may not bring any meaningful performance difference. I’m still running some larger server workloads, but whether it’s everything I’ve seen on multiple Zen 3 systems today or yesterday, disabling PSF will not have any major impact. Thankfully, there is nothing more terrifying than some of the past x86_64 speculative execution mitigations that we have seen in the past few years-just a few days ago, in fact, Intel’s Rocket Lake was still bearing the cost of Spectre mitigation measures. , There are many other examples and benchmarks. The past three years.

For those who realized the rapid turnaround of AMD Zen 3 PSF benchmarks during the Easter weekend, consider joining Phoronix Premium or tipping. At the very least, please don’t use an ad blocker; your support enables you to benchmark every day of the year.

If you like this article, please consider joining Phoronix Premium to view the ad-free, multi-page articles and other benefits of this site in a single page. PayPal prompts are also accepted. thank you for your support.


Source link