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: <2cde5e91-b357-81f9-9e39-fd5d99bb81fd@redhat.com>
Date:   Fri, 6 Mar 2020 11:00:12 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        linmiaohe <linmiaohe@...wei.com>
Cc:     "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH] KVM: VMX: Use wrapper macro
 ~RMODE_GUEST_OWNED_EFLAGS_BITS directly

On 06/03/20 10:44, Vitaly Kuznetsov wrote:
>>> Define a macro RMODE_HOST_OWNED_EFLAGS_BITS for (X86_EFLAGS_IOPL |
>>> X86_EFLAGS_VM) as suggested by Vitaly seems a good way to fix this ?
>>> Thanks.
>> No, what if a host-owned flag was zero?  I'd just leave it as is.
>>
> I'm not saying my suggestion was a good idea but honestly I'm failing to
> wrap my head around this. The suggested 'RMODE_HOST_OWNED_EFLAGS_BITS'
> would just be a define for (X86_EFLAGS_IOPL | X86_EFLAGS_VM) so
> technically the patch would just be nop, no?

It would not be a nop for the reader.

Something called RMODE_{GUEST,HOST}_OWNED_EFLAGS_BITS is a mask.  It
tells you nothing about whether those bugs are 0 or 1.  It's just by
chance that all three host-owned EFLAGS bits are 1 while in real mode.
It wouldn't be the case if, for example, we ran the guest using vm86
mode extensions (i.e. setting CR4.VME=1).  Then VIF would be host-owned,
but it wouldn't necessarily be 1.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ