Re: [PATCH] numa: fix /proc/<pid>/numa_maps for THP

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

 



On Mon, Apr 04, 2016 at 05:24:00PM +0200, Gerald Schaefer wrote:
> In gather_pte_stats() a THP pmd is cast into a pte, which is wrong because the
> layouts may differ depending on the architecture. On s390 this will lead to
> inaccurate numap_maps accounting in /proc because of misguided pte_present()
> and pte_dirty() checks on the fake pte.
> 
> On other architectures pte_present() and pte_dirty() may work by chance, but
> there may be an issue with direct-access (dax) mappings w/o underlying struct
> pages when HAVE_PTE_SPECIAL is set and THP is available. In vm_normal_page()
> the fake pte will be checked with pte_special() and because there is no
> "special" bit in a pmd, this will always return false and the VM_PFNMAP |
> VM_MIXEDMAP checking will be skipped. On dax mappings w/o struct pages, an
> invalid struct page pointer would then be returned that can crash the kernel.
> 
> This patch fixes the numa_maps THP handling by introducing new "_pmd" variants
> of the can_gather_numa_stats() and vm_normal_page() functions.
> 
> Signed-off-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # v4.3+

What is the git commit id of this in Linus's tree?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]