1. 17 Oct, 2008 1 commit
  2. 16 Oct, 2008 1 commit
    • Linus Torvalds's avatar
      Introduce is_vmalloc_or_module_addr() and use with DEBUG_VIRTUAL · 73bdf0a6
      Linus Torvalds authored
      Impact: crash on module insertion with CONFIG_DEBUG_VIRTUAL
      
      We would incorrectly BUG due to:
      
         VIRTUAL_BUG_ON(!is_vmalloc_addr(vmalloc_addr) &&
         	          !is_module_address(addr));
      
      ... because, at least on x86-64, is_module_address() doesn't do what
      it should.  This patch introduces is_vmalloc_or_module_addr(), which
      is what we really want anyway, and uses it instead.
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      73bdf0a6
  3. 15 Oct, 2008 1 commit
    • Suresh Siddha's avatar
      x86: fix compat-vdso · f61f1b57
      Suresh Siddha authored
      Jeff Chua reported that this patch:
      
      > -#define PTE_IDENT_ATTR  0x007          /* PRESENT+RW+USER */
      > -#define PDE_IDENT_ATTR  0x067          /* PRESENT+RW+USER+DIRTY+ACCESSED */
      > +#define PTE_IDENT_ATTR  0x003          /* PRESENT+RW */
      > +#define PDE_IDENT_ATTR  0x063          /* PRESENT+RW+DIRTY+ACCESSED */
      
      broke kernels with CONFIG_COMPAT_VDSO set with this init segfault:
      
      init[1]: segfault at ffffe01c up b7f0dc28 sp bfc26628 error 5 in ld-2.7.90.so[b7f0b000+1c000]
      
      Include USER bit in the PDE_IDENT_ATTR only, as the protection bits
      are combined from the PDE and PTE entries. This will allow the high
      mapped VDSO page in the case of CONFIG_COMPAT_VDSO to be user
      readable.
      Reported-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f61f1b57
  4. 13 Oct, 2008 2 commits
    • Ingo Molnar's avatar
      x86/mm: unify init task OOM handling · 3a1dfe6e
      Ingo Molnar authored
      Linus noticed that the "again:" versus "survive:" OOM logic for
      the init task was arbitrarily different.
      
      The 64-bit codepath is the better one, because it correctly re-lookups
      the vma after having dropped the ->mmap_sem.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a1dfe6e
    • Linus Torvalds's avatar
      x86/mm: do not trigger a kernel warning if user-space disables interrupts and... · 891cffbd
      Linus Torvalds authored
      x86/mm: do not trigger a kernel warning if user-space disables interrupts and generates a page fault
      
      Arjan reported a spike in the following bug pattern in v2.6.27:
      
         http://www.kerneloops.org/searchweek.php?search=lock_page
      
      which happens because hwclock started triggering warnings due to
      a (correct) might_sleep() check in the MM code.
      
      The warning occurs because hwclock uses this dubious sequence of
      code to run "atomic" code:
      
        static unsigned long
        atomic(const char *name, unsigned long (*op)(unsigned long),
               unsigned long arg)
        {
          unsigned long v;
          __asm__ volatile ("cli");
          v = (*op)(arg);
          __asm__ volatile ("sti");
          return v;
        }
      
      Then it pagefaults in that "atomic" section, triggering the warning.
      
      There is no way the kernel could provide "atomicity" in this path,
      a page fault is a cannot-continue machine event so the kernel has to
      wait for the page to be filled in.
      
      Even if it was just a minor fault we'd have to take locks and might have
      to spend quite a bit of time with interrupts disabled - not nice to irq
      latencies in general.
      
      So instead just enable interrupts in the pagefault path unconditionally
      if we come from user-space, and handle the fault.
      
      Also, while touching this code, unify some trivial parts of the x86
      VM paths at the same time.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarArjan van de Ven <arjan@infradead.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      891cffbd
  5. 12 Oct, 2008 35 commits