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

Re: [Xen-devel] [PATCH] xen/page_alloc: Keep away MFN 0 from the buddy allocator



On 09.08.2019 20:15, Stewart Hildebrand wrote:
On Friday, August 9, 2019 9:39 AM, Jan Beulich <jbeulich@xxxxxxxx> wrote:
On 09.08.2019 14:14, Julien Grall wrote:
Combining of buddies happens only such that the resulting larger buddy
is still order-aligned. To cross a zone boundary while merging, the
implication is that both the buddy [0, 2^n-1] and the buddy
[2^n, 2^(n+1)] are free.

[2^n, 2^(n+1)-1]

You may want to add that merging across zone boundaries is what we
need to prevent.

Ideally we want to fix the allocator, but for now we can just prevent
adding the MFN 0 in the allocator.

On x86, the MFN 0 is already kept away from the buddy allocator. So the
bug can only happen on Arm platform where the first memory bank is
starting at 0.

As this is a specific to the allocator, the MFN 0 is removed in the common code
to cater all the architectures (current and future).

Reported-by: Jeff Kubascik <jeff.kubascik@xxxxxxxxxxxxxxx>
Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Here is Jeff's initial patch for the issue.

To be honest, it would have been nice if you had clarified _why_
you sent this in reply here.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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