Kconfig.debug 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. config PAGE_EXTENSION
  2. bool "Extend memmap on extra space for more information on page"
  3. ---help---
  4. Extend memmap on extra space for more information on page. This
  5. could be used for debugging features that need to insert extra
  6. field for every page. This extension enables us to save memory
  7. by not allocating this extra memory according to boottime
  8. configuration.
  9. config DEBUG_PAGEALLOC
  10. bool "Debug page memory allocations"
  11. depends on DEBUG_KERNEL
  12. depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
  13. depends on !KMEMCHECK
  14. select PAGE_EXTENSION
  15. select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
  16. ---help---
  17. Unmap pages from the kernel linear mapping after free_pages().
  18. Depending on runtime enablement, this results in a small or large
  19. slowdown, but helps to find certain types of memory corruption.
  20. For architectures which don't enable ARCH_SUPPORTS_DEBUG_PAGEALLOC,
  21. fill the pages with poison patterns after free_pages() and verify
  22. the patterns before alloc_pages(). Additionally,
  23. this option cannot be enabled in combination with hibernation as
  24. that would result in incorrect warnings of memory corruption after
  25. a resume because free pages are not saved to the suspend image.
  26. By default this option will have a small overhead, e.g. by not
  27. allowing the kernel mapping to be backed by large pages on some
  28. architectures. Even bigger overhead comes when the debugging is
  29. enabled by DEBUG_PAGEALLOC_ENABLE_DEFAULT or the debug_pagealloc
  30. command line parameter.
  31. config SLUB_DEBUG_PANIC_ON
  32. bool "Enable to Panic on SLUB corruption detection"
  33. depends on SLUB_DEBUG
  34. help
  35. SLUB has a resiliency feature enabled which restores bytes in
  36. order for production environments to continue to operate. IN
  37. debug options this may not be desirable as it prevents from
  38. investigating the root cause which may be rooted within cache
  39. or memory.
  40. config DEBUG_PAGEALLOC_ENABLE_DEFAULT
  41. bool "Enable debug page memory allocations by default?"
  42. default n
  43. depends on DEBUG_PAGEALLOC
  44. ---help---
  45. Enable debug page memory allocations by default? This value
  46. can be overridden by debug_pagealloc=off|on.
  47. config PAGE_POISONING
  48. bool "Poison pages after freeing"
  49. select PAGE_EXTENSION
  50. select PAGE_POISONING_NO_SANITY if HIBERNATION
  51. ---help---
  52. Fill the pages with poison patterns after free_pages() and verify
  53. the patterns before alloc_pages. The filling of the memory helps
  54. reduce the risk of information leaks from freed data. This does
  55. have a potential performance impact.
  56. Note that "poison" here is not the same thing as the "HWPoison"
  57. for CONFIG_MEMORY_FAILURE. This is software poisoning only.
  58. If unsure, say N
  59. config PAGE_POISONING_ENABLE_DEFAULT
  60. bool "Enable page poisoning by default?"
  61. default n
  62. depends on PAGE_POISONING
  63. ---help---
  64. Enable page poisoning of free pages by default? This value
  65. can be overridden by page_poison=off|on. This can be used
  66. to avoid passing the kernel parameter and let page poisoning
  67. feature enabled by default.
  68. config PAGE_POISONING_NO_SANITY
  69. depends on PAGE_POISONING
  70. bool "Only poison, don't sanity check"
  71. ---help---
  72. Skip the sanity checking on alloc, only fill the pages with
  73. poison on free. This reduces some of the overhead of the
  74. poisoning feature.
  75. If you are only interested in sanitization, say Y. Otherwise
  76. say N.
  77. config PAGE_POISONING_ZERO
  78. bool "Use zero for poisoning instead of random data"
  79. depends on PAGE_POISONING
  80. ---help---
  81. Instead of using the existing poison value, fill the pages with
  82. zeros. This makes it harder to detect when errors are occurring
  83. due to sanitization but the zeroing at free means that it is
  84. no longer necessary to write zeros when GFP_ZERO is used on
  85. allocation.
  86. If unsure, say N
  87. bool
  88. config DEBUG_PAGE_REF
  89. bool "Enable tracepoint to track down page reference manipulation"
  90. depends on DEBUG_KERNEL
  91. depends on TRACEPOINTS
  92. ---help---
  93. This is a feature to add tracepoint for tracking down page reference
  94. manipulation. This tracking is useful to diagnose functional failure
  95. due to migration failures caused by page reference mismatches. Be
  96. careful when enabling this feature because it adds about 30 KB to the
  97. kernel code. However the runtime performance overhead is virtually
  98. nil until the tracepoints are actually enabled.