Commit 8c9a134c authored by Kees Cook's avatar Kees Cook Committed by Linus Torvalds

mm: clarify CONFIG_PAGE_POISONING and usage

The Kconfig text for CONFIG_PAGE_POISONING doesn't mention that it has to
be enabled explicitly.  This updates the documentation for that and adds a
note about CONFIG_PAGE_POISONING to the "page_poison" command line docs.
While here, change description of CONFIG_PAGE_POISONING_ZERO too, as it's
not "random" data, but rather the fixed debugging value that would be used
when not zeroing.  Additionally removes a stray "bool" in the Kconfig.

Link: http://lkml.kernel.org/r/20180725223832.GA43733@beastSigned-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a670468f
...@@ -3041,8 +3041,9 @@ ...@@ -3041,8 +3041,9 @@
on: enable the feature on: enable the feature
page_poison= [KNL] Boot-time parameter changing the state of page_poison= [KNL] Boot-time parameter changing the state of
poisoning on the buddy allocator. poisoning on the buddy allocator, available with
off: turn off poisoning CONFIG_PAGE_POISONING=y.
off: turn off poisoning (default)
on: turn on poisoning on: turn on poisoning
panic= [KNL] Kernel behaviour on panic: delay <timeout> panic= [KNL] Kernel behaviour on panic: delay <timeout>
......
...@@ -46,7 +46,8 @@ config PAGE_POISONING ...@@ -46,7 +46,8 @@ config PAGE_POISONING
Fill the pages with poison patterns after free_pages() and verify Fill the pages with poison patterns after free_pages() and verify
the patterns before alloc_pages. The filling of the memory helps the patterns before alloc_pages. The filling of the memory helps
reduce the risk of information leaks from freed data. This does reduce the risk of information leaks from freed data. This does
have a potential performance impact. have a potential performance impact if enabled with the
"page_poison=1" kernel boot option.
Note that "poison" here is not the same thing as the "HWPoison" Note that "poison" here is not the same thing as the "HWPoison"
for CONFIG_MEMORY_FAILURE. This is software poisoning only. for CONFIG_MEMORY_FAILURE. This is software poisoning only.
...@@ -65,7 +66,7 @@ config PAGE_POISONING_NO_SANITY ...@@ -65,7 +66,7 @@ config PAGE_POISONING_NO_SANITY
say N. say N.
config PAGE_POISONING_ZERO config PAGE_POISONING_ZERO
bool "Use zero for poisoning instead of random data" bool "Use zero for poisoning instead of debugging value"
depends on PAGE_POISONING depends on PAGE_POISONING
---help--- ---help---
Instead of using the existing poison value, fill the pages with Instead of using the existing poison value, fill the pages with
...@@ -75,7 +76,6 @@ config PAGE_POISONING_ZERO ...@@ -75,7 +76,6 @@ config PAGE_POISONING_ZERO
allocation. allocation.
If unsure, say N If unsure, say N
bool
config DEBUG_PAGE_REF config DEBUG_PAGE_REF
bool "Enable tracepoint to track down page reference manipulation" bool "Enable tracepoint to track down page reference manipulation"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment