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: <404bce5c-19ef-e103-7b68-5c81697d2a1f@redhat.com>
Date:   Mon, 8 Feb 2021 17:47:22 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Yu Zhang <yu.c.zhang@...ux.intel.com>
Cc:     seanjc@...gle.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, vkuznets@...hat.com,
        wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org
Subject: Re: [PATCH v2] KVM: x86/MMU: Do not check unsync status for root SP.

On 08/02/21 14:49, Yu Zhang wrote:
> On Mon, Feb 08, 2021 at 12:36:57PM +0100, Paolo Bonzini wrote:
>> On 07/02/21 13:22, Yu Zhang wrote:
>>> In shadow page table, only leaf SPs may be marked as unsync.
>>> And for non-leaf SPs, we use unsync_children to keep the number
>>> of the unsynced children. In kvm_mmu_sync_root(), sp->unsync
>>> shall always be zero for the root SP, , hence no need to check
>>> it. Instead, a warning inside mmu_sync_children() is added, in
>>> case someone incorrectly used it.
>>>
>>> Also, clarify the mmu_need_write_protect(), by moving the warning
>>> into kvm_unsync_page().
>>>
>>> Signed-off-by: Yu Zhang <yu.c.zhang@...ux.intel.com>
>>> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
>>
>> This should really be more of a Co-developed-by, and there are a couple
>> adjustments that could be made in the commit message.  I've queued the patch
>> and I'll fix it up later.
> 
> Indeed. Thanks for the remind, and I'll pay attention in the future. :)

Also:

arch/x86/kvm/mmu/mmu.c: In function ‘mmu_sync_children’:
arch/x86/kvm/mmu/mmu.c:2002:17: error: ‘sp’ is used uninitialized in 
this function [-Werror=uninitialized]
   WARN_ON_ONCE(sp->unsync);

so how was this tested?

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ