From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 2 of 2] x86/mm: Disable paging_prep Date: Mon, 09 Jan 2012 16:41:27 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: andres@gridcentric.ca, tim@xen.org, olaf@aepfle.de, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org xen/arch/x86/mm/p2m.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) The only way to page-in a page is now the safe paging_load domctl. (Unless the page was never paged out in the first place) Signed-off-by: Andres Lagar-Cavilla Acked-by: Tim Deegan diff -r f7c330d5b4b5 -r d5e830891ee2 xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -989,6 +989,10 @@ int p2m_mem_paging_prep(struct domain *d /* Allocate a page if the gfn does not have one yet */ if ( !mfn_valid(mfn) ) { + /* If the user did not provide a buffer, we disallow */ + ret = -EINVAL; + if ( unlikely(user_ptr == NULL) ) + goto out; /* Get a free page */ ret = -ENOMEM; page = alloc_domheap_page(p2m->domain, 0);