lguest: map switcher with executable page table entries
authorMatias Zabaljauregui <zabaljauregui@gmail.com>
Sat, 30 May 2009 18:35:49 +0000 (15:35 -0300)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 12 Jun 2009 12:57:06 +0000 (22:27 +0930)
Map switcher with executable page table entries.
(This bug didn't matter before PAE and hence NX support -- RR)

Signed-off-by: Matias Zabaljauregui <zabaljauregui@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/lguest/core.c
drivers/lguest/page_tables.c

index 03fbc88c002391b565698d55e730b0836391693e..d0298dc45d974ab7877e7945c290f06104784a29 100644 (file)
@@ -95,7 +95,7 @@ static __init int map_switcher(void)
         * array of struct pages.  It increments that pointer, but we don't
         * care. */
        pagep = switcher_page;
-       err = map_vm_area(switcher_vma, PAGE_KERNEL, &pagep);
+       err = map_vm_area(switcher_vma, PAGE_KERNEL_EXEC, &pagep);
        if (err) {
                printk("lguest: map_vm_area failed: %i\n", err);
                goto free_vma;
index a059cf9980f711b97d2009545b574e63cf79fddc..496995370fbc632b8fb6cd8502ea160c2e18a355 100644 (file)
@@ -714,7 +714,7 @@ void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages)
 
        /* Make the last PGD entry for this Guest point to the Switcher's PTE
         * page for this CPU (with appropriate flags). */
-       switcher_pgd = __pgd(__pa(switcher_pte_page) | __PAGE_KERNEL);
+       switcher_pgd = __pgd(__pa(switcher_pte_page) | __PAGE_KERNEL_EXEC);
 
        cpu->lg->pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX] = switcher_pgd;