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: <538b24cc-c291-877c-44c3-e1221322dafe@oracle.com>
Date:   Fri, 15 Dec 2017 11:06:10 -0500
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Juergen Gross <jgross@...e.com>, xen-devel@...ts.xen.org,
        linux-kernel@...r.kernel.org
Cc:     helgaas@...nel.org, christian.koenig@....com
Subject: Re: [PATCH] xen/balloon: Mark unallocated host memory as UNUSABLE

On 12/15/2017 10:33 AM, Juergen Gross wrote:
> On 15/12/17 15:58, Boris Ostrovsky wrote:
>> On 12/15/2017 09:47 AM, Juergen Gross wrote:
>>> On 15/12/17 15:24, Boris Ostrovsky wrote:
>>>>>> +
>>>>>> +	hostmem_resource->start = max_addr;
>>>>>> +	hostmem_resource->end = entry->addr + entry->size;
>>>>>> +	for (; i < memmap.nr_entries; i++) {
>>>>>> +		entry = &xen_e820_table->entries[i];
>>>>>> +		if (entry->type == E820_TYPE_RAM)
>>>>> Shouldn't that be != ?
>>>> No, the idea here is to populate hostmem_resource with ranges already
>>>> taken by things other than RAM, leaving memory regions as available for
>>>> the balloon hotplug. This will allow us to use allocate_resource(),
>>>> which searches for a free range, in the balloon driver.
>>> But why says the comment "Host memory not allocated to dom0" then?
>> hostmem_resource is created starting from the end of dom0 RAM and ending
>> at the end of host RAM. If these two are the same (or if the former is
>> larger, which I don't think is possible) then there is nothing to do, as
>> the hostmem_resource will be empty. That's what the comment is referring
>> to.
>>
>>> And why are you trying to allocate from this resource in case of
>>> hotplugging memory (and fall back to iomem_resource in case of
>>> failure)?
>> Because that area (end of dom0 RAM through end of host RAM) is not going
>> to be used by anyone else and thus is available. That was the idea
>> behind f5775e0b6116.
> Aah, now I've got it.
>
> Could you please add a comment like:
>
> /* Mark non-RAM regions as not available. */
>
> above the test? That would have helped me. :-)


Will do, thanks.

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ