From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: CONFIG_XEN_COMPAT_030002 broken? Date: Tue, 14 Nov 2006 15:25:45 +0000 Message-ID: References: <4559DCA1.6030102@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4559DCA1.6030102@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann , Jan Beulich Cc: Xen devel list , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 14/11/06 15:11, "Gerd Hoffmann" wrote: >> not nice for use in (early) feature detection. Maybe it'd be better to try >> and write >> a page table entry without PAGE_USER, and check whether that bit got turned >> on implicitly... > > Patch attached, seems to work ok, survived quick test with ttylinux on > both 3.0.3 and 3.0.2 without crashing and detected both versions correctly. > > cheers, > Gerd Kernel_pages_need_user_flag seems unnecessary. The one consumer of that flag could simply do 'flags |= kernel_page_user' unconditionally. Also, is it necessary to default to 3.0.2 behaviour? Could we have kernel_page_user==0 initially and then change the value only if 3.0.2 is detected? This would provide a sanity check that check_page_user_flag() is being executed early enough. We could even set kernel_page_user to a garbage value initially, like ~0. So far we have maintained the COMPAT code to be easily entirely strippable. So the change to pmd_bad() should either use kernel_page_user rather than _PAGE_USER, or its definition should be conditional on the COMPAT flag. -- Keir