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: Wed, 13 Mar 2024 14:27:35 -0700
From: Dongli Zhang <dongli.zhang@...cle.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "hao.p.peng@...ux.intel.com" <hao.p.peng@...ux.intel.com>,
        "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KVM: x86/mmu: x86: Don't overflow lpage_info when
 checking attributes



On 3/13/24 09:25, Edgecombe, Rick P wrote:
> On Wed, 2024-03-13 at 02:49 -0700, Dongli Zhang wrote:
>> The memslot id=10 has:
>> - base_gfn=1048576
>> - npages=1024
>>
>> Therefore, "level - 1  will not contain an entry for each GFN at page
>> size
>> level". If aligned, we expect lpage_info[0] to have 512 elements.
>>
>> 1GB: lpage_info[1] has 1 element
>> 2MB: lpage_info[0] has 2 elemtnts
> 
> 1048576 GFN is 2MB aligned, 1024 pages is also 2MB aligned. There are
> 512 4k pages in a 2MB huge page, so size of 2 for npages=1024 looks
> right to me. One struct for each potential 2MB huge page in the range.
> 
> I think overall you are saying in this response that you didn't find
> any problem in the analysis or fix. Is that correct?

I do not find any problem in the analysis or fix, except the same curiosity on
KVM_LPAGE_MIXED_FLAG.

Thank you very much!

Dongli Zhang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ