diff mbox

CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

Message ID 3f8bc778-c193-4405-69bc-1df7b062b2f3@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris Ostrovsky Sept. 13, 2017, 6:49 p.m. UTC
On 09/13/2017 02:25 PM, Julien Grall wrote:
> Hi,
> 
> On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
>> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
>> Well, that's not a fix. This eliminates the case that something in
>> ARM-specific code (which I haven't tested) accidentally clears
>> _PGC_need_scrub.
>>
>> OK, I think I know what the problem is. You are using
>> CONFIG_SEPARATE_XENHEAP, are you?
> 
> It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.
> 
> Note that Arm32 is using separate heap.


For separate heap we will need




If that doesn't help then there are two cases where free_heap_pages is
called with 'false' --- one in alloc_domheap_pages() and the other in
online_page().

Setting one and then the other would further narrow it down.


-boris
diff mbox

Patch

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index b5243fc..9f62ea2 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2059,7 +2059,7 @@  void free_xenheap_pages(void *v, unsigned int order)

     memguard_guard_range(v, 1 << (order + PAGE_SHIFT));

-    free_heap_pages(virt_to_page(v), order, false);
+    free_heap_pages(virt_to_page(v), order, scrub_debug);
 }

 #else