27 Jan, 2007

1 commit

  • I wouldn't mind if CONFIG_COMPAT_VDSO went away entirely. But if it's there,
    it should work properly. Currently it's quite haphazard: both real vma and
    fixmap are mapped, both are put in the two different AT_* slots, sysenter
    returns to the vma address rather than the fixmap address, and core dumps yet
    are another story.

    This patch makes CONFIG_COMPAT_VDSO disable the real vma and use the fixmap
    area consistently. This makes it actually compatible with what the old vdso
    implementation did.

    Signed-off-by: Roland McGrath
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

07 Dec, 2006

3 commits

  • Move header includes for the nopud / nopmd types to the location of the actual
    pte / pgd type definitions. This allows generic 4-level page type code to be
    written before the split 2/3 level page table headers are included.

    Signed-off-by: Zachary Amsden
    Signed-off-by: Andi Kleen
    Cc: Andi Kleen
    Cc: Jeremy Fitzhardinge
    Cc: Chris Wright
    Signed-off-by: Andrew Morton

    Zachary Amsden
     
  • Defining __PHYSICAL_START and __KERNEL_START in asm-i386/page.h works but
    it triggers a full kernel rebuild for the silliest of reasons. This
    modifies the users to directly use CONFIG_PHYSICAL_START and linux/config.h
    which prevents the full rebuild problem, which makes the code much
    more maintainer and hopefully user friendly.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Eric W. Biederman
     
  • On x86_64 we have to be careful with calculating the physical
    address of kernel symbols. Both because of compiler odditities
    and because the symbols live in a different range of the virtual
    address space.

    Having a defintition of __pa_symbol that works on both x86_64 and
    i386 simplifies writing code that works for both x86_64 and
    i386 that has these kinds of dependencies.

    So this patch adds the trivial i386 __pa_symbol definition.

    Added assembly magic similar to RELOC_HIDE as suggested by Andi Kleen.
    Just picked it up from x86_64.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Eric W. Biederman
     

28 Jun, 2006

1 commit

  • Move the i386 VDSO down into a vma and thus randomize it.

    Besides the security implications, this feature also helps debuggers, which
    can COW a vma-backed VDSO just like a normal DSO and can thus do
    single-stepping and other debugging features.

    It's good for hypervisors (Xen, VMWare) too, which typically live in the same
    high-mapped address space as the VDSO, hence whenever the VDSO is used, they
    get lots of guest pagefaults and have to fix such guest accesses up - which
    slows things down instead of speeding things up (the primary purpose of the
    VDSO).

    There's a new CONFIG_COMPAT_VDSO (default=y) option, which provides support
    for older glibcs that still rely on a prelinked high-mapped VDSO. Newer
    distributions (using glibc 2.3.3 or later) can turn this option off. Turning
    it off is also recommended for security reasons: attackers cannot use the
    predictable high-mapped VDSO page as syscall trampoline anymore.

    There is a new vdso=[0|1] boot option as well, and a runtime
    /proc/sys/vm/vdso_enabled sysctl switch, that allows the VDSO to be turned
    on/off.

    (This version of the VDSO-randomization patch also has working ELF
    coredumping, the previous patch crashed in the coredumping code.)

    This code is a combined work of the exec-shield VDSO randomization
    code and Gerd Hoffmann's hypervisor-centric VDSO patch. Rusty Russell
    started this patch and i completed it.

    [akpm@osdl.org: cleanups]
    [akpm@osdl.org: compile fix]
    [akpm@osdl.org: compile fix 2]
    [akpm@osdl.org: compile fix 3]
    [akpm@osdl.org: revernt MAXMEM change]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Cc: Gerd Hoffmann
    Cc: Rusty Russell
    Cc: Zachary Amsden
    Cc: Andi Kleen
    Cc: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

27 Apr, 2006

1 commit


26 Apr, 2006

1 commit


28 Mar, 2006

1 commit


02 Feb, 2006

1 commit

  • Enable selection of different user/kernel VM splits for i386, including an
    optimized mode for 1GB physical RAM, which gives the kernel a direct (non
    HIGHMEM) mapping to the entire 1GB rather than just the first 896MB.

    There is a similarly a similarly optimized mode for machines with exactly 2GB
    of physical RAM.

    This can speed up the kernel by avoiding having to create/destroy temporary
    HIGHMEM mappings, and by not having to include HIGHMEM support at all on such
    machines. The flip side is that there's less virtual addressing left for
    userspace in these alternatives, and some binary-only kernel modules may
    misbehave unless rebuilt with the same VMSPLIT option as the main kernel
    image.

    Original idea/patch from Jens Axboe, modified based on suggestions from Linus
    et al.

    Signed-off-by: Mark Lord
    Signed-off-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Lord
     

05 Sep, 2005

2 commits

  • I don't think we need to call hugetlb_clean_stale_pgtable() anymore
    in 2.6.13 because of the rework with free_pgtables(). It now collect
    all the pte page at the time of munmap. It used to only collect page
    table pages when entire one pgd can be freed and left with staled pte
    pages. Not anymore with 2.6.13. This function will never be called
    and We should turn it into a BUG_ON.

    I also spotted two problems here, not Adam's fault :-)
    (1) in huge_pte_alloc(), it looks like a bug to me that pud is not
    checked before calling pmd_alloc()
    (2) in hugetlb_clean_stale_pgtable(), it also missed a call to
    pmd_free_tlb. I think a tlb flush is required to flush the mapping
    for the page table itself when we clear out the pmd pointing to a
    pte page. However, since hugetlb_clean_stale_pgtable() is never
    called, so it won't trigger the bug.

    Signed-off-by: Ken Chen
    Cc: Adam Litke
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen, Kenneth W
     
  • Someone mentioned that almost all the architectures used basically the same
    implementation of get_order. This patch consolidates them into
    asm-generic/page.h and includes that in the appropriate places. The
    exceptions are ia64 and ppc which have their own (presumably optimised)
    versions.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

26 Jun, 2005

1 commit

  • For one kernel to report a crash another kernel has created we need
    to have 2 kernels loaded simultaneously in memory. To accomplish this
    the two kernels need to built to run at different physical addresses.

    This patch adds the CONFIG_PHYSICAL_START option to the x86 kernel
    so we can do just that. You need to know what you are doing and
    the ramifications are before changing this value, and most users
    won't care so I have made it depend on CONFIG_EMBEDDED

    bzImage kernels will work and run at a different address when compiled
    with this option but they will still load at 1MB. If you need a kernel
    loaded at a different address as well you need to boot a vmlinux.

    Signed-off-by: Eric Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

24 Jun, 2005

2 commits

  • Provide the architecture specific implementation for SPARSEMEM for i386 SMP
    and NUMA systems.

    Signed-off-by: Andy Whitcroft
    Signed-off-by: Dave Hansen
    Signed-off-by: Martin Bligh
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • discontig.c has some assumptions that mem_map[]s inside of a node are
    contiguous. Teach it to make sure that each region that it's bringing online
    is actually made up of valid ranges of ram.

    Written-by: Andy Whitcroft
    Signed-off-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

22 Jun, 2005

1 commit

  • A lot of the code in arch/*/mm/hugetlbpage.c is quite similar. This patch
    attempts to consolidate a lot of the code across the arch's, putting the
    combined version in mm/hugetlb.c. There are a couple of uglyish hacks in
    order to covert all the hugepage archs, but the result is a very large
    reduction in the total amount of code. It also means things like hugepage
    lazy allocation could be implemented in one place, instead of six.

    Tested, at least a little, on ppc64, i386 and x86_64.

    Notes:
    - this patch changes the meaning of set_huge_pte() to be more
    analagous to set_pte()
    - does SH4 need s special huge_ptep_get_and_clear()??

    Acked-by: William Lee Irwin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

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