lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABgObfbTB-xuJbFAzH0xV78aZm_mb92oEpNUyZ8LdvN1GdChMw@mail.gmail.com>
Date: Mon, 27 Jan 2025 16:25:07 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [GIT PULL] KVM changes for Linux 6.14

On Sat, Jan 25, 2025 at 7:16 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> Ehh. My resolution ended up being different.
>
> I did this instead:
>
>                F(WRMSR_XX_BASE_NS),
>                SYNTHESIZED_F(SBPB),
>                SYNTHESIZED_F(IBPB_BRTYPE),
>                SYNTHESIZED_F(SRSO_NO),
> +              SYNTHESIZED_F(SRSO_USER_KERNEL_NO),
>
> which (apart from the line ordering) differs from your suggestion in
> F() vs SYNTHESIZED_F().
>
> That really seemed to be the RightThing(tm) to do from the context of
> the two conflicting commits, but maybe there was some reason that I
> didn't catch that you kept it as a plain "F()".

SYNTHESIZED_F() generally is used together with setup_force_cpu_cap(),
i.e. when it makes sense to present the feature even if cpuid does not
have it *and* the VM is not able to see the difference. You use it if
when mitigations on the host automatically protect the guest as well.
For example, F vs. SYNTHESIZED_F() makes a difference for
X86_FEATURE_SRSO_NO because F() hides the feature from the guests and
SYNTHESIZED_F() lets them use it.

It doesn't hurt at all in this case, or make a difference for that
matter, because there's no
setup_force_cpu_cap(X86_FEATURE_SRSO_USER_KERNEL_NO). But here using
SYNTHESIZED_F it's just a little less self-documenting and a little
less future proof, nothing that a quick follow-up PR can't fix, and
also I managed to pull the KVM/ARM changes from the wrong machine so I
have to send a second KVM pull request anyway.

> So please take a look, and if I screwed up send me a fix (with a
> scathing explanation for why I'm maternally related to some
> less-than-gifted rodentia with syphilis).

I think I don't want to know if it's a Finnish metaphor, or you came
up with it all on your own...

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ