02 Mar, 2007

1 commit

  • Fix the fact that pte_mkread set _PAGE_RW instead of _PAGE_USER (the logic is
    copied from i386 in most place, so it is really as bad as you're thinking).

    Thus currently page tables are more permissive than they should.

    Such a change may trigger other latent bugs, so be careful with this.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

02 Feb, 2007

1 commit


30 Sep, 2006

1 commit

  • Andi is making pte_mkexec go away, and UML had one of the last uses.

    This removes the use and the definition.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

26 Sep, 2006

1 commit

  • One of the changes necessary for shared page tables is to standardize the
    pxx_page macros. pte_page and pmd_page have always returned the struct
    page associated with their entry, while pte_page_kernel and pmd_page_kernel
    have returned the kernel virtual address. pud_page and pgd_page, on the
    other hand, return the kernel virtual address.

    Shared page tables needs pud_page and pgd_page to return the actual page
    structures. There are very few actual users of these functions, so it is
    simple to standardize their usage.

    Since this is basic cleanup, I am submitting these changes as a standalone
    patch. Per Hugh Dickins' comments about it, I am also changing the
    pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.

    Signed-off-by: Dave McCracken
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave McCracken
     

30 Oct, 2005

1 commit

  • Convert those common loops using page_table_lock on the outside and
    pte_offset_map within to use just pte_offset_map_lock within instead.

    These all hold mmap_sem (some exclusively, some not), so at no level can a
    page table be whipped away from beneath them. But whereas pte_alloc loops
    tested with the "atomic" pmd_present, these loops are testing with pmd_none,
    which on i386 PAE tests both lower and upper halves.

    That's now unsafe, so add a cast into pmd_none to test only the vital lower
    half: we lose a little sensitivity to a corrupt middle directory, but not
    enough to worry about. It appears that i386 and UML were the only
    architectures vulnerable in this way, and pgd and pud no problem.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

23 Sep, 2005

1 commit


11 Sep, 2005

1 commit

  • Turns out that, for UML, a *lot* of VM-related trivial functions are not
    inlined but rather normal functions.

    In other sections of UML code, this is justified by having files which
    interact with the host and cannot therefore include kernel headers, but in
    this case there's no such justification.

    I've had to turn many of them to macros because of missing declarations. While
    doing this, I've decided to reuse some already existing macros.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

05 Sep, 2005

2 commits

  • There is a lot of code which is duplicated between the 2 and 3 level
    implementation, with the only difference that the 3-level implementation is a
    bit more generalized (instead of accessing directly pte_t.pte, it uses the
    appropriate access macros).

    So this code is joined together.

    As obvious, a "core code nice cleanup" is not a "stability-friendly patch" so
    usual care applies.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • _PAGE_FILE does not indicate whether a file is in page / swap cache, it is
    set just for non-linear PTE's. Correct the comment for i386, x86_64, UML.
    Also clearify _PAGE_NONE.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

29 May, 2005

1 commit

  • This var is currently useless, as it's apparent from reading the code. Until
    2.6.11 it was used in some code related to jail mode, in the same proc.:

    if(jail){
    while(!reading) sched_yield();
    }

    jail mode has been dropped, together with that use, so let's finish dropping
    this.

    Also, remove some other useless definitions I met.

    Acked-by: Jeff Dike
    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

06 May, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds