public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [regression/bisected] Add IBPB decreases performance in two times
@ 2023-08-12 22:55 Mikhail Gavrilov
  2023-08-13  8:24 ` Borislav Petkov
  0 siblings, 1 reply; 10+ messages in thread
From: Mikhail Gavrilov @ 2023-08-12 22:55 UTC (permalink / raw)
  To: Borislav Petkov, Linux List Kernel Mailing, x86

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

Hi,
I use Fedora Rawhide and noted that between commits 14f9643dc90a and
13b937206866 the gaming performance of my computer decreased in two
times.
I start bisecting and bisect blame this commit
138bcddb86d8a4f842e4ed6f0585abc9b1a764ff.

commit 233d6f68b98d480a7c42ebe78c38f79d44741ca9
Author: Borislav Petkov (AMD) <bp@alien8.de>
Date:   Thu Jul 6 15:04:35 2023 +0200

    x86/srso: Add IBPB

    Add the option to mitigate using IBPB on a kernel entry. Pull in the
    Retbleed alternative so that the IBPB call from there can be used. Also,
    if Retbleed mitigation is done using IBPB, the same mitigation can and
    must be used here.

    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>

 arch/x86/include/asm/nospec-branch.h |  2 +-
 arch/x86/kernel/cpu/bugs.c           | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

I understand the concern about security but having 60FPS instead of
120FPS is not that I expected.
Unfortunately I couldn't just revert commit
233d6f68b98d480a7c42ebe78c38f79d44741ca9 because of conflicts.
But reverting all these commits:
❯ git revert 43972cf2deb2f54a97530c82b88c555fd682428e -n -m 1
❯ git revert 272b86ba9d97518b3c14b97514b6544eef87e7a5 -n -m 1
Auto-merging arch/x86/include/asm/processor.h
❯ git revert 77245f1c3c6495521f6a3af082696ee2f8ce3921 -n
Auto-merging arch/x86/include/asm/processor.h
❯ git revert 64094e7e3118aff4b0be8ff713c242303e139834 -n -m 1
❯ git revert 138bcddb86d8a4f842e4ed6f0585abc9b1a764ff -n -m 1
Auto-merging arch/x86/include/asm/processor.h
restore PC initial performance

My specs:
CPU: Ryzen 7950X
GPU: Radeon 7900XTX

Maybe it is possible to find another approach for solving security
issue without slowing down?
If not, then provide an option to turn off this slowdown.

I attached my build kernel config in the archive below.

-- 
Best Regards,
Mike Gavrilov.

[-- Attachment #2: .config.zip --]
[-- Type: application/zip, Size: 63266 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-15 12:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12 22:55 [regression/bisected] Add IBPB decreases performance in two times Mikhail Gavrilov
2023-08-13  8:24 ` Borislav Petkov
2023-08-13  9:17   ` Mikhail Gavrilov
2023-08-13  9:35     ` Borislav Petkov
     [not found]       ` <CABXGCsMrNz2SPYN=zLZTT7jU4axSi-XLm4bTm7K3NuWnc=yr9g@mail.gmail.com>
2023-08-13 11:14         ` Borislav Petkov
2023-08-13 11:38           ` Mikhail Gavrilov
2023-08-13 14:19             ` Borislav Petkov
2023-08-13 22:30               ` Mikhail Gavrilov
2023-08-14 12:37                 ` Peter Zijlstra
2023-08-15 12:19                   ` Mikhail Gavrilov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox