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] [day] [month] [year] [list]
Date:   Fri, 9 Apr 2021 09:57:57 +0800
From:   Haiwei Li <lihaiwei.kernel@...il.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        Haiwei Li <lihaiwei@...cent.com>
Subject: Re: [PATCH] KVM: vmx: add mismatched size in vmcs_check32

On Fri, Apr 9, 2021 at 12:05 AM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Thu, Apr 08, 2021, lihaiwei.kernel@...il.com wrote:
> > From: Haiwei Li <lihaiwei@...cent.com>
> >
> > vmcs_check32 misses the check for 64-bit and 64-bit high.
>
> Can you clarify in the changelog that, while it is architecturally legal to
> access 64-bit and 64-bit high fields with a 32-bit read/write in 32-bit mode,
> KVM should never do partial accesses to VMCS fields.  And/or note that the
> 32-bit accesses are done in vmcs_{read,write}64() when necessary?  Hmm, maybe:
>
>   Add compile-time assertions in vmcs_check32() to disallow accesses to
>   64-bit and 64-bit high fields via vmcs_{read,write}32().  Upper level
>   KVM code should never do partial accesses to VMCS fields.  KVM handles
>   the split accesses automatically in vmcs_{read,write}64() when running
>   as a 32-bit kernel.

Good suggestion, thanks. I will send v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ