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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <70593a1fb0364825aa985f6cdb0d7e46@huawei.com>
Date:   Fri, 6 Mar 2020 02:11:11 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
CC:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "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>
Subject: Re: [PATCH] KVM: VMX: Use wrapper macro
 ~RMODE_GUEST_OWNED_EFLAGS_BITS directly

Vitaly Kuznetsov <vkuznets@...hat.com> writes:
>linmiaohe <linmiaohe@...wei.com> writes:
>
>> From: Miaohe Lin <linmiaohe@...wei.com>
>>
>>  
>>  	vmcs_writel(GUEST_RFLAGS, flags);
>>  	vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);
>
>Double negations are evil, let's define a macro for 'X86_EFLAGS_IOPL | X86_EFLAGS_VM' instead (completely untested):

You catch the evil guys again. :) But ~RMODE_GUEST_OWNED_EFLAGS_BITS is used by many other func, we should fix them
together. Would try your version, many thanks!

>
>
>-       flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
>+       flags |= RMODE_HOST_OWNED_EFLAGS_BITS;
> 
>        vmcs_writel(GUEST_RFLAGS, flags);
>        vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ