[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 9/9] mm: Make sure pages are scrubbed
On 29/03/17 17:45, Wei Liu wrote: > On Wed, Mar 29, 2017 at 12:35:25PM -0400, Boris Ostrovsky wrote: >> On 03/29/2017 12:25 PM, Wei Liu wrote: >>> On Fri, Mar 24, 2017 at 01:05:04PM -0400, Boris Ostrovsky wrote: >>>> +static void check_one_page(struct page_info *pg) >>>> +{ >>>> + mfn_t mfn = _mfn(page_to_mfn(pg)); >>>> + uint64_t *ptr; >>>> + >>>> + ptr = map_domain_page(mfn); >>>> + ASSERT(*ptr != PAGE_POISON); >>> Should be ASSERT(*ptr == 0) here. >> We can't assume it will be zero --- see scrub_one_page(). > It's still possible a value is leaked from the guest, and that value has > rather high probability to be != PAGE_POISON. > > In that case there should be a ifdef to match the debug and non-debug > builds. The only sensible thing to do is check that the entire page is zeroes. This is a debug option after all. We don't want to waste time poisoning zero pages we hand back to the free pool. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |