WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: Oops when loading xen_platform_pci module in HVM dom

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Oops when loading xen_platform_pci module in HVM domain on CS 11429
From: Steve Dobbelstein <steved@xxxxxxxxxx>
Date: Mon, 11 Sep 2006 09:48:53 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, sos22@xxxxxxxxxxxxx
Delivery-date: Mon, 11 Sep 2006 07:49:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C12772C5.10D7%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote on 09/08/2006 01:19:33 PM:

> On 8/9/06 18:03, "Steven Smith" <sos22-xen@xxxxxxxxxxxxx> wrote:
>
> >> Page directory entries use permissions _PAGE_TABLE, which does not
include
> >> _PAGE_NX. So clearing _PAGE_NX from the PTEs, using
> >> change_page_attr(PAGE_KERNEL_EXEC), should suffice.
> > The oops message is fairly clear that _PAGE_NX is set on the PMD, and
> > I'd guess it probably got set from phys_pmd_init.
> >
> > I think vmalloc_exec is probably the right answer here.  I'll have a
> > go at this over the weekend.
>
> I've had a go (c/s 11435). It's complicated by the fact that
vmalloc_exec()
> and __PAGE_KERNEL_EXEC are not exported to modules.
>
>  -- Keir

Is this something that should be fixed in the mainline kernel?  Basically,
a change_page_attr() to make a page executable doesn't work.  It seems to
me that split_large_page() in arch/x86_64/mm/pageattr.c should be changed
to not propagate the old pgprot to the new PMD (at least not the _PAGE_NX
bit) but rather propagate it into the new sub-PTEs that are created when
the large PTE is split.

Thoughts?

Steve D.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel