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

Re: [Xen-devel] [PATCHES v8 8/8] mm: Make sure pages are scrubbed

Hi Boris,

On 16/08/17 19:33, Boris Ostrovsky wrote:
+static void check_one_page(struct page_info *pg)
+    mfn_t mfn = _mfn(page_to_mfn(pg));
+    const uint64_t *ptr;
+    unsigned int i;
+    if ( !boot_scrub_done )
+        return;
+    ptr = map_domain_page(mfn);
+    for ( i = 0; i < PAGE_SIZE / sizeof (*ptr); i++ )
+        ASSERT(ptr[i] == SCRUB_PATTERN);

ASSERT will be turned into a NOP on non-debug build. However, it is possible to select SCRUB_DEBUG on non-debug build when expert mode is enabled.

So I would turn this into a BUG_ON() to make it work in all configuration.


Julien Grall

Xen-devel mailing list



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