Displaying 6 results from an estimated 6 matches for "kernel_pgd_boundary".
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
...(ie. addresses 3G-4G).
> - *
> - * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
> + * And the other PGD entry to make the linear mapping at PAGE_OFFSET
> */
> - if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
> + if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
How about this:
+ if (!!copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
:)
Thanks,
-L
> return -EFAULT;
> #else
> /*
>
> _______________________________________________
> Lguest mailing list
> Lguest at lists.ozlabs.or...
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
...(ie. addresses 3G-4G).
> - *
> - * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
> + * And the other PGD entry to make the linear mapping at PAGE_OFFSET
> */
> - if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
> + if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
How about this:
+ if (!!copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
:)
Thanks,
-L
> return -EFAULT;
> #else
> /*
>
> _______________________________________________
> Lguest mailing list
> Lguest at lists.ozlabs.or...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
..._DOWN(__pa_symbol(initial_page_table)));
set_page_prot(initial_page_table, PAGE_KERNEL);
set_page_prot(initial_kernel_pmd, PAGE_KERNEL);
@@ -2036,7 +2037,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
copy_page(initial_page_table, pgd);
initial_page_table[KERNEL_PGD_BOUNDARY] =
- __pgd(__pa(initial_kernel_pmd) | _PAGE_PRESENT);
+ __pgd(__pa_symbol(initial_kernel_pmd) | _PAGE_PRESENT);
set_page_prot(initial_kernel_pmd, PAGE_KERNEL_RO);
set_page_prot(initial_page_table, PAGE_KERNEL_RO);
@@ -2045,8 +2046,8 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsi...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
..._DOWN(__pa_symbol(initial_page_table)));
set_page_prot(initial_page_table, PAGE_KERNEL);
set_page_prot(initial_kernel_pmd, PAGE_KERNEL);
@@ -2036,7 +2037,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
copy_page(initial_page_table, pgd);
initial_page_table[KERNEL_PGD_BOUNDARY] =
- __pgd(__pa(initial_kernel_pmd) | _PAGE_PRESENT);
+ __pgd(__pa_symbol(initial_kernel_pmd) | _PAGE_PRESENT);
set_page_prot(initial_kernel_pmd, PAGE_KERNEL_RO);
set_page_prot(initial_page_table, PAGE_KERNEL_RO);
@@ -2045,8 +2046,8 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsi...
2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
...*
- * And the third PGD entry (ie. addresses 3G-4G).
- *
- * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
+ * And the other PGD entry to make the linear mapping at PAGE_OFFSET
*/
- if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
+ if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
return -EFAULT;
#else
/*
2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
...*
- * And the third PGD entry (ie. addresses 3G-4G).
- *
- * FIXME: This assumes that PAGE_OFFSET for the Guest is 0xC0000000.
+ * And the other PGD entry to make the linear mapping at PAGE_OFFSET
*/
- if (copy_to_user(&pgdir[3], &pgd, sizeof(pgd)) != 0)
+ if (copy_to_user(&pgdir[KERNEL_PGD_BOUNDARY], &pgd, sizeof(pgd)))
return -EFAULT;
#else
/*