From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] linux/x86-64: allow kernel init memory to be freed Date: Fri, 02 Mar 2007 15:23:40 +0000 Message-ID: References: <45E812E4.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45E812E4.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/3/07 11:04, "Jan Beulich" wrote: > + if (addr >= __START_KERNEL_map) { > + /* make_readonly() reports all kernel addresses. */ > + __make_page_writable(__va(__pa(addr))); > + __make_page_readonly((void *)addr); > + } I'm confused by this: 1. Why does the write-protection need to be changed unconditionally, or even at all? Is there anything write-protected in the init sections? 2. Is it safe to keep init mappings above START_KERNEL_map at all, even read-only? I'd have thought we'd be in trouble if the balloon driver manages to allocate those pages and tries to free them to Xen. Perhaps they should be blown away entirely? -- Keir