0001 config PAGE_EXTENSION
0002 bool "Extend memmap on extra space for more information on page"
0004 Extend memmap on extra space for more information on page. This
0005 could be used for debugging features that need to insert extra
0006 field for every page. This extension enables us to save memory
0007 by not allocating this extra memory according to boottime
0010 config DEBUG_PAGEALLOC
0011 bool "Debug page memory allocations"
0012 depends on DEBUG_KERNEL
0013 depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
0014 depends on !KMEMCHECK
0015 select PAGE_EXTENSION
0016 select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
0018 Unmap pages from the kernel linear mapping after free_pages().
0019 Depending on runtime enablement, this results in a small or large
0020 slowdown, but helps to find certain types of memory corruption.
0022 For architectures which don't enable ARCH_SUPPORTS_DEBUG_PAGEALLOC,
0023 fill the pages with poison patterns after free_pages() and verify
0024 the patterns before alloc_pages(). Additionally,
0025 this option cannot be enabled in combination with hibernation as
0026 that would result in incorrect warnings of memory corruption after
0027 a resume because free pages are not saved to the suspend image.
0029 By default this option will have a small overhead, e.g. by not
0030 allowing the kernel mapping to be backed by large pages on some
0031 architectures. Even bigger overhead comes when the debugging is
0032 enabled by DEBUG_PAGEALLOC_ENABLE_DEFAULT or the debug_pagealloc
0033 command line parameter.
0035 config DEBUG_PAGEALLOC_ENABLE_DEFAULT
0036 bool "Enable debug page memory allocations by default?"
0037 default n
0038 depends on DEBUG_PAGEALLOC
0040 Enable debug page memory allocations by default? This value
0041 can be overridden by debug_pagealloc=off|on.
0043 config PAGE_POISONING
0044 bool "Poison pages after freeing"
0045 select PAGE_EXTENSION
0046 select PAGE_POISONING_NO_SANITY if HIBERNATION
0048 Fill the pages with poison patterns after free_pages() and verify
0049 the patterns before alloc_pages. The filling of the memory helps
0050 reduce the risk of information leaks from freed data. This does
0051 have a potential performance impact.
0053 Note that "poison" here is not the same thing as the "HWPoison"
0054 for CONFIG_MEMORY_FAILURE. This is software poisoning only.
0056 If unsure, say N
0058 config PAGE_POISONING_NO_SANITY
0059 depends on PAGE_POISONING
0060 bool "Only poison, don't sanity check"
0062 Skip the sanity checking on alloc, only fill the pages with
0063 poison on free. This reduces some of the overhead of the
0064 poisoning feature.
0066 If you are only interested in sanitization, say Y. Otherwise
0067 say N.
0069 config PAGE_POISONING_ZERO
0070 bool "Use zero for poisoning instead of random data"
0071 depends on PAGE_POISONING
0073 Instead of using the existing poison value, fill the pages with
0074 zeros. This makes it harder to detect when errors are occurring
0075 due to sanitization but the zeroing at free means that it is
0076 no longer necessary to write zeros when GFP_ZERO is used on
0079 If unsure, say N
0082 config DEBUG_PAGE_REF
0083 bool "Enable tracepoint to track down page reference manipulation"
0084 depends on DEBUG_KERNEL
0085 depends on TRACEPOINTS
0087 This is a feature to add tracepoint for tracking down page reference
0088 manipulation. This tracking is useful to diagnose functional failure
0089 due to migration failures caused by page reference mismatches. Be
0090 careful when enabling this feature because it adds about 30 KB to the
0091 kernel code. However the runtime performance overhead is virtually
0092 nil until the tracepoints are actually enabled.