|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] mm/page_alloc: always scrub pages given to the allocator
Hi, On 10/01/2018 10:58 AM, Sergey Dyasli wrote: Having the allocator return unscrubbed pages is a potential security concern: some domain can be given pages with memory contents of another domain. This may happen, for example, if a domain voluntarily releases its own memory (ballooning being the easiest way for doing this). Based on the comment you dropped below, I would have thought the guest is responsible for scrubbing page it gives back using ballooning. Did I miss anything? Some of the user may want to skip boot scrub because they don't need it or for testing as it is too slow on some platform (i.e models).Change the allocator to always scrub the pages given to it by: 1. free_xenheap_pages() 2. free_domheap_pages() 3. online_page() 4. init_heap_pages() Performance testing has shown that on multi-node machines bootscrub vastly outperforms idle-loop scrubbing. So instead of marking all pages dirty initially, introduce bootscrub_done to track the completion of the process and eagerly scrub all allocated pages during boot. If bootscrub is disabled, then all pages will be marked as dirty right away and scrubbed either in idle-loop or eagerly during allocation. After this patch, alloc_heap_pages() is guaranteed to return scrubbed pages to a caller unless MEMF_no_scrub flag was provided. Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> --- CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> CC: Jan Beulich <jbeulich@xxxxxxxx> CC: Julien Grall <julien.grall@xxxxxxx> CC: Tim Deegan <tim@xxxxxxx> --- docs/misc/xen-command-line.markdown | 3 ++- xen/common/page_alloc.c | 29 ++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 1ffd586224..d9bebf4e4b 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -233,7 +233,8 @@ Xen's command line.Scrub free RAM during boot. This is a safety feature to preventaccidentally leaking sensitive VM data into other VMs if Xen crashes -and reboots. +and reboots. Note: even if disabled, RAM will still be scrubbed in +background. I think we still need to give an option to those users. If they disabled boot scrub, then they now the security risk based on the description of the option. ### bootscrub\_chunk Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |