search for: pgdirs

Displaying 20 results from an estimated 95 matches for "pgdirs".

Did you mean: pgdir
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...We kill any Guest trying to touch the Switcher addresses. */ if (index >= SWITCHER_PGD_INDEX) { kill_guest(cpu, "attempt to access switcher pages"); index = 0; } +#endif /* Return a pointer index'th pgd entry for the i'th page table. */ return &cpu->lg->pgdirs[i].pgdir[index]; } +#ifdef CONFIG_X86_PAE +/* This routine then takes the PGD entry given above, which contains the + * address of the PMD page. It then returns a pointer to the PMD entry for the + * given address. */ +static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...We kill any Guest trying to touch the Switcher addresses. */ if (index >= SWITCHER_PGD_INDEX) { kill_guest(cpu, "attempt to access switcher pages"); index = 0; } +#endif /* Return a pointer index'th pgd entry for the i'th page table. */ return &cpu->lg->pgdirs[i].pgdir[index]; } +#ifdef CONFIG_X86_PAE +/* This routine then takes the PGD entry given above, which contains the + * address of the PMD page. It then returns a pointer to the PMD entry for the + * given address. */ +static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...ts re-used + * for a different process, and we think it's the same one as the one we have + * in our little pgdir cache. */ +void invalidate_pagetable(struct lg_cpu *cpu, unsigned long pgtable) +{ + unsigned int pgdir = find_pgdir(cpu->lg, pgtable); + + if (pgdir != ARRAY_SIZE(cpu->lg->pgdirs)) { + if (pgdir == cpu->cpu_pgd) + kill_guest(cpu, "Attempt to invalidate in-use pgdir"); + /* We set it to an invalid value. */ + cpu->lg->pgdirs[pgdir].gpgdir = -1UL; + } +} + /*H:470 Finally, a routine which throws away everything: all PGD entries in all * the shadow p...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...ts re-used + * for a different process, and we think it's the same one as the one we have + * in our little pgdir cache. */ +void invalidate_pagetable(struct lg_cpu *cpu, unsigned long pgtable) +{ + unsigned int pgdir = find_pgdir(cpu->lg, pgtable); + + if (pgdir != ARRAY_SIZE(cpu->lg->pgdirs)) { + if (pgdir == cpu->cpu_pgd) + kill_guest(cpu, "Attempt to invalidate in-use pgdir"); + /* We set it to an invalid value. */ + cpu->lg->pgdirs[pgdir].gpgdir = -1UL; + } +} + /*H:470 Finally, a routine which throws away everything: all PGD entries in all * the shadow p...
2009 Jun 05
1
[PATCH] lguest: PAE support
...We kill any Guest trying to touch the Switcher addresses. */ if (index >= SWITCHER_PGD_INDEX) { kill_guest(cpu, "attempt to access switcher pages"); index = 0; } +#endif /* Return a pointer index'th pgd entry for the i'th page table. */ return &cpu->lg->pgdirs[i].pgdir[index]; } +#ifdef CONFIG_X86_PAE +/* This routine then takes the PGD entry given above, which contains the + * address of the PMD page. It then returns a pointer to the PMD entry for the + * given address. */ +static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)...
2009 Jun 05
1
[PATCH] lguest: PAE support
...We kill any Guest trying to touch the Switcher addresses. */ if (index >= SWITCHER_PGD_INDEX) { kill_guest(cpu, "attempt to access switcher pages"); index = 0; } +#endif /* Return a pointer index'th pgd entry for the i'th page table. */ return &cpu->lg->pgdirs[i].pgdir[index]; } +#ifdef CONFIG_X86_PAE +/* This routine then takes the PGD entry given above, which contains the + * address of the PMD page. It then returns a pointer to the PMD entry for the + * given address. */ +static pmd_t *spmd_addr(struct lg_cpu *cpu, pgd_t spgd, unsigned long vaddr)...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...++) + INIT_LIST_HEAD(&linfo->pmd_hash[i]); + + for (i=0; i < PTE_HASH_SIZE; i++) + INIT_LIST_HEAD(&linfo->pte_hash[i]); + + err = init_guest_pagetable(linfo, args[1]); + if (err) + return -ENOMEM; /* what else to return ?? */ +#if 0 + + lg->state = setup_guest_state(i, lg->pgdirs[lg->pgdidx].pgdir,args[2]); + if (!lg->state) { + err = -ENOEXEC; + goto release_pgtable; + } +#endif + err = vcpu_start(0, linfo, args[2], __va(read_cr3())); + if (err < 0) + return err; + + file->private_data = linfo->vcpu[0]; + + return sizeof(args); +} + +static ssize_t write(...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...++) + INIT_LIST_HEAD(&linfo->pmd_hash[i]); + + for (i=0; i < PTE_HASH_SIZE; i++) + INIT_LIST_HEAD(&linfo->pte_hash[i]); + + err = init_guest_pagetable(linfo, args[1]); + if (err) + return -ENOMEM; /* what else to return ?? */ +#if 0 + + lg->state = setup_guest_state(i, lg->pgdirs[lg->pgdidx].pgdir,args[2]); + if (!lg->state) { + err = -ENOEXEC; + goto release_pgtable; + } +#endif + err = vcpu_start(0, linfo, args[2], __va(read_cr3())); + if (err < 0) + return err; + + file->private_data = linfo->vcpu[0]; + + return sizeof(args); +} + +static ssize_t write(...
2008 Dec 29
0
[PULL] virtio and lguest tree
...lush.h> #include <asm/uaccess.h> +#include <asm/bootparam.h> #include "lg.h" /*M:008 We hold reference to pages, which prevents them from being swapped. @@ -581,15 +582,82 @@ void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 idx) release_pgd(lg, lg->pgdirs[pgdir].pgdir + idx); } +/* Once we know how much memory we have we can construct simple identity + * (which set virtual == physical) and linear mappings + * which will get the Guest far enough into the boot to create its own. + * + * We lay them out of the way, just below the initrd (which is wh...
2008 Dec 29
0
[PULL] virtio and lguest tree
...lush.h> #include <asm/uaccess.h> +#include <asm/bootparam.h> #include "lg.h" /*M:008 We hold reference to pages, which prevents them from being swapped. @@ -581,15 +582,82 @@ void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 idx) release_pgd(lg, lg->pgdirs[pgdir].pgdir + idx); } +/* Once we know how much memory we have we can construct simple identity + * (which set virtual == physical) and linear mappings + * which will get the Guest far enough into the boot to create its own. + * + * We lay them out of the way, just below the initrd (which is wh...
2007 May 09
1
[patch 3/9] lguest: the host code
...signed int clobber; + + copy_in_guest_info(lg, pages); + + /* Put eflags on stack, lcall does rest: suitable for iret return. */ + asm volatile("pushf; lcall *lguest_entry" + : "=a"(clobber), "=b"(clobber) + : "0"(pages), "1"(__pa(lg->pgdirs[lg->pgdidx].pgdir)) + : "memory", "%edx", "%ecx", "%edi", "%esi"); +} + +int run_guest(struct lguest *lg, char *__user user) +{ + while (!lg->dead) { + unsigned int cr2 = 0; /* Damn gcc */ + + /* Hypercalls first: we might have been ou...
2007 May 09
1
[patch 3/9] lguest: the host code
...signed int clobber; + + copy_in_guest_info(lg, pages); + + /* Put eflags on stack, lcall does rest: suitable for iret return. */ + asm volatile("pushf; lcall *lguest_entry" + : "=a"(clobber), "=b"(clobber) + : "0"(pages), "1"(__pa(lg->pgdirs[lg->pgdidx].pgdir)) + : "memory", "%edx", "%ecx", "%edi", "%esi"); +} + +int run_guest(struct lguest *lg, char *__user user) +{ + while (!lg->dead) { + unsigned int cr2 = 0; /* Damn gcc */ + + /* Hypercalls first: we might have been ou...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
On Thu, 2007-07-19 at 23:13 +0300, S.?a?lar Onur wrote: > Hi; > > Remove -static from Documentation/lguest/Makefile, most distros only provides shared library form of zlib in their default installation. > And shared linking also provides litte tiny security for hypotetical security problems will be introduced by zlib :). Unfortunately, this introduces a security hole. See, the
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
On Thu, 2007-07-19 at 23:13 +0300, S.?a?lar Onur wrote: > Hi; > > Remove -static from Documentation/lguest/Makefile, most distros only provides shared library form of zlib in their default installation. > And shared linking also provides litte tiny security for hypotetical security problems will be introduced by zlib :). Unfortunately, this introduces a security hole. See, the
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
This patch moves lguest.c one level bellow, and enhances it with the ability to kick off 64 binaries. It would be much easier to just ifdef functions, but I have x86_64 machines loading 32-bit kernels as a longer goal, and that's why the patch features the load_elf_header() function. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> -- Glauber de Oliveira Costa Red Hat Inc.
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
This patch moves lguest.c one level bellow, and enhances it with the ability to kick off 64 binaries. It would be much easier to just ifdef functions, but I have x86_64 machines loading 32-bit kernels as a longer goal, and that's why the patch features the load_elf_header() function. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> -- Glauber de Oliveira Costa Red Hat Inc.
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
plain text document attachment (lguest64-loader.patch) I noticed that the lguest loader code for i386 was in Documentation/lguest. Well, that's fine (I guess) but it can't just be for i386. So I made a separate directory to put the loader code in. So now we have: Documentation/lguest/i386/... for the lguest i386 loader. and Documentation/lguest/x86_64/... for the lguest x86_64
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
plain text document attachment (lguest64-loader.patch) I noticed that the lguest loader code for i386 was in Documentation/lguest. Well, that's fine (I guess) but it can't just be for i386. So I made a separate directory to put the loader code in. So now we have: Documentation/lguest/i386/... for the lguest i386 loader. and Documentation/lguest/x86_64/... for the lguest x86_64