Re: [PATCH] mm: Improve dump_page() for compound pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2020 at 08:44:15PM -0800, Matthew Wilcox wrote:
> From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>
> 
> There was no protection against a corrupted struct page having an
> implausible compound_head().  Sanity check that a compound page has
> a head within reach of the maximum allocatable page (this will need
> to be adjusted if one of the plans to allocate 1GB pages comes to
> fruition).  In addition,
> 
>  - Print the mapping pointer using %p insted of %px.  The actual value of
>    the pointer can be read out of the raw page dump and using %p gives a
>    chance to correlate it with an earlier printk of the mapping pointer
>  - Print the mapping pointer from the head page, not the tail page
>    (the tail ->mapping pointer may be in use for other purposes, eg part
>    of a list_head)
>  - Print the order of the page for compound pages
>  - Dump the raw head page as well as the raw page
>  - Print the refcount from the head page, not the tail page
> 
> Suggested-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Co-developed-by: John Hubbard <jhubbard@xxxxxxxxxx>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

John, in comparison to the patch I sent earlier today, this version changes:

 - Reorder the things printed in the compound case so that all the information
   which is printed for non-compound pages is printed first
 - Removed inconsistent space between "compound_mapcount:" and the value
 - Print the refcount of the head page instead of the tail (which was the
   point of your patch!)
 - Print the mapping of the head instead of the tail
 - Don't dump the raw head if the page passed in was the head page




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux