ChangeSet 1.2093, 2005/02/22 20:21:46-08:00, [EMAIL PROTECTED]

        [PATCH] ppc32: kernel mapping breakage
        
        Christoph Lameter's patch that change page allocators to use GFP_ZERO
        broke ppc32 in a subtle way. Our allocator is designed to work before
        mem_init_done, in which cases it uses a ppc specific early_get_page()
        which doesn't return zeroed pages. However, he removed the call to
        clear_page() unconditionally, thus causing the kernel initial page
        tables to have random data in them.
        
        They are initialized with set_pte, which means it's _mostly_ harmless,
        except that set_pte on ppc32 preserves the _PAGE_HASHPTE bit, thus we
        end up with random bits there, which can cause issues with further
        manipulation of the kernel page tables and will slow down all hash
        faults to them causing unnecessary searches.
        
        Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 pgtable.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c     2005-02-22 21:05:47 -08:00
+++ b/arch/ppc/mm/pgtable.c     2005-02-22 21:05:47 -08:00
@@ -107,8 +107,11 @@
                        ptepage->mapping = (void *) mm;
                        ptepage->index = address & PMD_MASK;
                }
-       } else
+       } else {
                pte = (pte_t *)early_get_page();
+               if (pte)
+                       clear_page(pte);
+       }
        return pte;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to