[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH DOCDAY] xen: write a high level description of the sub-arch choices for heap layout



On 30/09/15 12:31, Ian Campbell wrote:
> On Wed, 2015-09-30 at 12:10 +0100, Andrew Cooper wrote:
>
>>> + *
>>> + *             Xen heap pages are always anonymous (that is, not tied
>>> + *             or accounted to any particular domain).
>>> + *
>>> + * - Dom heap: Memory which must be explicitly mapped, usually
>>> + *             transiently with map_domain_page, in order to be
>>> + *             used. va() and pa() are not valid for such memory.
>> While stashing pointers into domheap memory is definitely buggy.
> Is this true even considering the result of e.g. map_domain_page_global?
>

Ah yes - constructing a pointer into something mapped as global is safe.

Basically I was wondering about some wording to state that things like:

p = map_domain_page();
d->foo->bar = p->baz;
unmap_domain_page(p);

is unsafe and shouldn't be done.  There is surprisingly little
difference between a xenheap page and a map_domain_page_global()'d page,
as they are both present in the permanent mappings.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.