Announcement

Collapse
No announcement yet.

Disabling Spectre V2 Mitigations Is What Can Impair AMD Ryzen 7000 Series Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CtrlAltShift
    replied
    As far as I understand, Spectre V2 mitigation restricts Indirect branch speculations. Is it possible, that changes done by AMD (probably as part of hardware mitigation implementation) caused indirect branch speculation speed regression so much, that code runs much slower with indirect branch speculation enabled?

    Leave a comment:


  • F.Ultra
    replied
    Originally posted by birdie View Post
    There's some trickery going on, e.g. the CPU could completely discard the instructions which are meant to protect against Spectre but there are other protections in place so the vulnerability is taken care of. Amazing I'd say except this could open the door to new vulnerabilities.
    That does not make any sense, if this is what is happening then we would just see the same performance with mitigations=on as mitigations=off, not more performance with mitigations=on. The question is how the mitigations=off kernel code looks for the case with IBRS present vs how it looks with mitigations=on, could be that mitigations=off contains NOP:s as placeholders for IBRS and Ryzen 4 simply trigger some sync on NOP or something else like this.

    Leave a comment:


  • Anux
    replied
    Originally posted by L_A_G View Post
    Considering the fact that the higher end part with the exact same μArch doesn't suffer from this puzzling ...
    Which higher part do you mean? Phoronix only showed 7950X and now 7600X.

    Leave a comment:


  • L_A_G
    replied
    Edit: Disregard what I originally wrote here. I seem to have misread the first paragraph and got the impression that the 7950 wasn't affected when this is just confirming it on the lower end part.
    Last edited by L_A_G; 04 October 2022, 10:56 AM.

    Leave a comment:


  • Anux
    replied
    Originally posted by ll1025 View Post
    Since when did the Linux enthusiast community become security-allergic luddites?
    Since when does ​Espionage724 represent the whole Linux enthusiast community? Do you even logic or just like to troll?

    Leave a comment:


  • NobodyXu
    replied
    Originally posted by birdie View Post
    There's some trickery going on, e.g. the CPU could completely discard the instructions which are meant to protect against Spectre but there are other protections in place so the vulnerability is taken care of. Amazing I'd say except this could open the door to new vulnerabilities.
    Yes, I believe this is a mistake that is going to backfire and hurt Zen4 later when new CVE is discovered because of this.
    Also, this "optimization" seems very fragile.

    What if the spectre v2 migration in linux changed in the future?
    Even some slight changes can shift the performance dramatically.

    I do wonder whether this behavior also exhibits on windows.
    If so, then the tuning might be even more sensible to changes in the kernel.

    Leave a comment:


  • skeevy420
    replied
    Originally posted by ll1025 View Post

    Since when did the Linux enthusiast community become security-allergic luddites?

    Do you also setenforce 0 and run as root? Maybe you stick to 1024 bit RSA because it's faster? And what's with that lengthy key exchange in SSH, take us back to telnet!

    It's 2022, and sentiments like yours are responsible for the massive cybercrime industry's success. Whether on Linux or Windows, this kind of "it'll never get me" attitude is exactly how they get you.
    Dammit. Schrodinger's Comment. While I agree with the sentiment, not every PC is internet facing or needs that kind of security. Something like a massive video encoding or graphics rendering farm behind layers of firewalls and security doesn't need or want mitigations enabled, or, rather, didn't traditionally need or want them enabled.

    Leave a comment:


  • ll1025
    replied
    Originally posted by Espionage724 View Post
    So now instead of being able to disable mitigations and get the processor's full-performance, the mitigations are built-in, presumably causing the same impact, and now can't be disabled?
    Since when did the Linux enthusiast community become security-allergic luddites?

    Do you also setenforce 0 and run as root? Maybe you stick to 1024 bit RSA because it's faster? And what's with that lengthy key exchange in SSH, take us back to telnet!

    It's 2022, and sentiments like yours are responsible for the massive cybercrime industry's success. Whether on Linux or Windows, this kind of "it'll never get me" attitude is exactly how they get you.

    Leave a comment:


  • skeevy420
    replied
    Interesting results. I suppose it's a good thing that mitigated=faster. Makes me wonder if they figured out an algorithm that makes mitigated code faster than unmitigated -- like if they know a range of stuff isn't going to be valid due to how mitigations work, just not operate or branch predict or WTF ever on that range versus the old way of doing it and tossing it aside or flushing the cache or something. Y'all get what I mean.

    phoronix

    Page 1:

    based on the CPU MSrs and applied

    return stack buffer (RSB) filling
    You didn't use the shift key for those.

    So to curious and dig deeper,
    Perhaps use, "Out of curiosity and to dig deeper," or "For those who are curious and to dig deeper,"

    I can't tell which one you meant for that to mean.

    Page 2:

    "spectre_v2=off" to disabling the
    "to disable"

    Page 3:

    Including code compilation workloads were negatively
    Should this be, "In addition to code compilation, workloads were negatively"?

    At a minimum add a comma between compilation and workloads.

    Leave a comment:


  • oibaf
    replied
    BTW mitigations=off just disable some (not all) mitigations that should slow down the system. In this case it should not disable the mitigations which won't slow down or make the system faster.

    Leave a comment:

Working...
X