]> Git Repo - linux.git/commit
mm: uninitialized struct page poisoning sanity checking
authorPavel Tatashin <[email protected]>
Thu, 5 Apr 2018 23:22:47 +0000 (16:22 -0700)
committerLinus Torvalds <[email protected]>
Fri, 6 Apr 2018 04:36:25 +0000 (21:36 -0700)
commitf165b378bbdf6c8afd950060fc3cbc935bb890c6
tree96664136ee6a6e2d2257f90c0ef703b556da3964
parent078eb6aa50dc50cd85f09a22226b7e238b3397ce
mm: uninitialized struct page poisoning sanity checking

During boot we poison struct page memory in order to ensure that no one
is accessing this memory until the struct pages are initialized in
__init_single_page().

This patch adds more scrutiny to this checking by making sure that flags
do not equal the poison pattern when they are accessed.  The pattern is
all ones.

Since node id is also stored in struct page, and may be accessed quite
early, we add this enforcement into page_to_nid() function as well.
Note, this is applicable only when NODE_NOT_IN_PAGE_FLAGS=n

[[email protected]: v4]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Pavel Tatashin <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Bharata B Rao <[email protected]>
Cc: Daniel Jordan <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Steven Sistare <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/mm.h
include/linux/page-flags.h
mm/memblock.c
This page took 0.059591 seconds and 4 git commands to generate.