Kconfig.debug 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. menu "Kernel hacking"
  2. config TRACE_IRQFLAGS_SUPPORT
  3. def_bool y
  4. source "lib/Kconfig.debug"
  5. config EARLY_PRINTK
  6. bool "Early printk" if EMBEDDED
  7. default y
  8. help
  9. Write kernel log output directly into the VGA buffer or to a serial
  10. port.
  11. This is useful for kernel debugging when your machine crashes very
  12. early before the console code is initialized. For normal operation
  13. it is not recommended because it looks ugly and doesn't cooperate
  14. with klogd/syslogd or the X server. You should normally N here,
  15. unless you want to debug such a crash.
  16. config DEBUG_STACKOVERFLOW
  17. bool "Check for stack overflows"
  18. depends on DEBUG_KERNEL
  19. help
  20. This option will cause messages to be printed if free stack space
  21. drops below a certain limit.
  22. config DEBUG_STACK_USAGE
  23. bool "Stack utilization instrumentation"
  24. depends on DEBUG_KERNEL
  25. help
  26. Enables the display of the minimum amount of free stack which each
  27. task has ever had available in the sysrq-T and sysrq-P debug output.
  28. This option will slow down process creation somewhat.
  29. config DEBUG_PAGEALLOC
  30. bool "Debug page memory allocations"
  31. depends on DEBUG_KERNEL
  32. help
  33. Unmap pages from the kernel linear mapping after free_pages().
  34. This results in a large slowdown, but helps to find certain types
  35. of memory corruptions.
  36. config DEBUG_PER_CPU_MAPS
  37. bool "Debug access to per_cpu maps"
  38. depends on DEBUG_KERNEL
  39. depends on X86_64_SMP
  40. default n
  41. help
  42. Say Y to verify that the per_cpu map being accessed has
  43. been setup. Adds a fair amount of code to kernel memory
  44. and decreases performance.
  45. Say N if unsure.
  46. config DEBUG_RODATA
  47. bool "Write protect kernel read-only data structures"
  48. default y
  49. depends on DEBUG_KERNEL
  50. help
  51. Mark the kernel read-only data as write-protected in the pagetables,
  52. in order to catch accidental (and incorrect) writes to such const
  53. data. This is recommended so that we can catch kernel bugs sooner.
  54. If in doubt, say "Y".
  55. config DEBUG_RODATA_TEST
  56. bool "Testcase for the DEBUG_RODATA feature"
  57. depends on DEBUG_RODATA
  58. help
  59. This option enables a testcase for the DEBUG_RODATA
  60. feature as well as for the change_page_attr() infrastructure.
  61. If in doubt, say "N"
  62. config DEBUG_NX_TEST
  63. tristate "Testcase for the NX non-executable stack feature"
  64. depends on DEBUG_KERNEL && m
  65. help
  66. This option enables a testcase for the CPU NX capability
  67. and the software setup of this feature.
  68. If in doubt, say "N"
  69. config 4KSTACKS
  70. bool "Use 4Kb for kernel stacks instead of 8Kb"
  71. depends on DEBUG_KERNEL
  72. depends on X86_32
  73. help
  74. If you say Y here the kernel will use a 4Kb stacksize for the
  75. kernel stack attached to each process/thread. This facilitates
  76. running more threads on a system and also reduces the pressure
  77. on the VM subsystem for higher order allocations. This option
  78. will also use IRQ stacks to compensate for the reduced stackspace.
  79. config X86_FIND_SMP_CONFIG
  80. def_bool y
  81. depends on X86_LOCAL_APIC || X86_VOYAGER
  82. depends on X86_32
  83. config X86_MPPARSE
  84. def_bool y
  85. depends on (X86_32 && (X86_LOCAL_APIC && !X86_VISWS)) || X86_64
  86. config DOUBLEFAULT
  87. default y
  88. bool "Enable doublefault exception handler" if EMBEDDED
  89. depends on X86_32
  90. help
  91. This option allows trapping of rare doublefault exceptions that
  92. would otherwise cause a system to silently reboot. Disabling this
  93. option saves about 4k and might cause you much additional grey
  94. hair.
  95. config IOMMU_DEBUG
  96. bool "Enable IOMMU debugging"
  97. depends on GART_IOMMU && DEBUG_KERNEL
  98. depends on X86_64
  99. help
  100. Force the IOMMU to on even when you have less than 4GB of
  101. memory and add debugging code. On overflow always panic. And
  102. allow to enable IOMMU leak tracing. Can be disabled at boot
  103. time with iommu=noforce. This will also enable scatter gather
  104. list merging. Currently not recommended for production
  105. code. When you use it make sure you have a big enough
  106. IOMMU/AGP aperture. Most of the options enabled by this can
  107. be set more finegrained using the iommu= command line
  108. options. See Documentation/x86_64/boot-options.txt for more
  109. details.
  110. config IOMMU_LEAK
  111. bool "IOMMU leak tracing"
  112. depends on DEBUG_KERNEL
  113. depends on IOMMU_DEBUG
  114. help
  115. Add a simple leak tracer to the IOMMU code. This is useful when you
  116. are debugging a buggy device driver that leaks IOMMU mappings.
  117. #
  118. # IO delay types:
  119. #
  120. config IO_DELAY_TYPE_0X80
  121. int
  122. default "0"
  123. config IO_DELAY_TYPE_0XED
  124. int
  125. default "1"
  126. config IO_DELAY_TYPE_UDELAY
  127. int
  128. default "2"
  129. config IO_DELAY_TYPE_NONE
  130. int
  131. default "3"
  132. choice
  133. prompt "IO delay type"
  134. default IO_DELAY_0X80
  135. config IO_DELAY_0X80
  136. bool "port 0x80 based port-IO delay [recommended]"
  137. help
  138. This is the traditional Linux IO delay used for in/out_p.
  139. It is the most tested hence safest selection here.
  140. config IO_DELAY_0XED
  141. bool "port 0xed based port-IO delay"
  142. help
  143. Use port 0xed as the IO delay. This frees up port 0x80 which is
  144. often used as a hardware-debug port.
  145. config IO_DELAY_UDELAY
  146. bool "udelay based port-IO delay"
  147. help
  148. Use udelay(2) as the IO delay method. This provides the delay
  149. while not having any side-effect on the IO port space.
  150. config IO_DELAY_NONE
  151. bool "no port-IO delay"
  152. help
  153. No port-IO delay. Will break on old boxes that require port-IO
  154. delay for certain operations. Should work on most new machines.
  155. endchoice
  156. if IO_DELAY_0X80
  157. config DEFAULT_IO_DELAY_TYPE
  158. int
  159. default IO_DELAY_TYPE_0X80
  160. endif
  161. if IO_DELAY_0XED
  162. config DEFAULT_IO_DELAY_TYPE
  163. int
  164. default IO_DELAY_TYPE_0XED
  165. endif
  166. if IO_DELAY_UDELAY
  167. config DEFAULT_IO_DELAY_TYPE
  168. int
  169. default IO_DELAY_TYPE_UDELAY
  170. endif
  171. if IO_DELAY_NONE
  172. config DEFAULT_IO_DELAY_TYPE
  173. int
  174. default IO_DELAY_TYPE_NONE
  175. endif
  176. config DEBUG_BOOT_PARAMS
  177. bool "Debug boot parameters"
  178. depends on DEBUG_KERNEL
  179. depends on DEBUG_FS
  180. help
  181. This option will cause struct boot_params to be exported via debugfs.
  182. config CPA_DEBUG
  183. bool "CPA self-test code"
  184. depends on DEBUG_KERNEL
  185. help
  186. Do change_page_attr() self-tests every 30 seconds.
  187. endmenu