1. 21 7月, 2007 3 次提交
  2. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  3. 16 7月, 2007 19 次提交
  4. 03 5月, 2007 13 次提交
  5. 19 4月, 2007 1 次提交
    • A
      KVM: Fix off-by-one when writing to a nonpae guest pde · 6b8d0f9b
      Avi Kivity 提交于
      Nonpae guest pdes are shadowed by two pae ptes, so we double the offset
      twice: once to account for the pte size difference, and once because we
      need to shadow pdes for a single guest pde.
      
      But when writing to the upper guest pde we also need to truncate the
      lower bits, otherwise the multiply shifts these bits into the pde index
      and causes an access to the wrong shadow pde.  If we're at the end of the
      page (accessing the very last guest pde) we can even overflow into the
      next host page and oops.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      6b8d0f9b
  6. 18 3月, 2007 2 次提交
    • A
      KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram · 27aba766
      Avi Kivity 提交于
      PAGE_MASK is an unsigned long, so using it to mask physical addresses on
      i386 (which are 64-bit wide) leads to truncation.  This can result in
      page->private of unrelated memory pages being modified, with disasterous
      results.
      
      Fix by not using PAGE_MASK for physical addresses; instead calculate
      the correct value directly from PAGE_SIZE.  Also fix a similar BUG_ON().
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      27aba766
    • A
      KVM: MMU: Fix guest writes to nonpae pde · ac1b714e
      Avi Kivity 提交于
      KVM shadow page tables are always in pae mode, regardless of the guest
      setting.  This means that a guest pde (mapping 4MB of memory) is mapped
      to two shadow pdes (mapping 2MB each).
      
      When the guest writes to a pte or pde, we intercept the write and emulate it.
      We also remove any shadowed mappings corresponding to the write.  Since the
      mmu did not account for the doubling in the number of pdes, it removed the
      wrong entry, resulting in a mismatch between shadow page tables and guest
      page tables, followed shortly by guest memory corruption.
      
      This patch fixes the problem by detecting the special case of writing to
      a non-pae pde and adjusting the address and number of shadow pdes zapped
      accordingly.
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      ac1b714e
  7. 04 3月, 2007 1 次提交