Kconfig.debug 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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 X86_PTDUMP
  47. bool "Export kernel pagetable layout to userspace via debugfs"
  48. depends on X86_64
  49. select DEBUG_FS
  50. help
  51. Say Y here if you want to show the kernel pagetable layout in a
  52. debugfs file. This information is only useful for kernel developers
  53. who are working in architecture specific areas of the kernel.
  54. It is probably not a good idea to enable this feature in a production
  55. kernel.
  56. If in doubt, say "N"
  57. config DEBUG_RODATA
  58. bool "Write protect kernel read-only data structures"
  59. default y
  60. depends on DEBUG_KERNEL
  61. help
  62. Mark the kernel read-only data as write-protected in the pagetables,
  63. in order to catch accidental (and incorrect) writes to such const
  64. data. This is recommended so that we can catch kernel bugs sooner.
  65. If in doubt, say "Y".
  66. config DEBUG_RODATA_TEST
  67. bool "Testcase for the DEBUG_RODATA feature"
  68. depends on DEBUG_RODATA
  69. help
  70. This option enables a testcase for the DEBUG_RODATA
  71. feature as well as for the change_page_attr() infrastructure.
  72. If in doubt, say "N"
  73. config DEBUG_NX_TEST
  74. tristate "Testcase for the NX non-executable stack feature"
  75. depends on DEBUG_KERNEL && m
  76. help
  77. This option enables a testcase for the CPU NX capability
  78. and the software setup of this feature.
  79. If in doubt, say "N"
  80. config 4KSTACKS
  81. bool "Use 4Kb for kernel stacks instead of 8Kb"
  82. depends on DEBUG_KERNEL
  83. depends on X86_32
  84. help
  85. If you say Y here the kernel will use a 4Kb stacksize for the
  86. kernel stack attached to each process/thread. This facilitates
  87. running more threads on a system and also reduces the pressure
  88. on the VM subsystem for higher order allocations. This option
  89. will also use IRQ stacks to compensate for the reduced stackspace.
  90. config X86_FIND_SMP_CONFIG
  91. def_bool y
  92. depends on X86_LOCAL_APIC || X86_VOYAGER
  93. depends on X86_32
  94. config X86_MPPARSE
  95. def_bool y
  96. depends on (X86_32 && (X86_LOCAL_APIC && !X86_VISWS)) || X86_64
  97. config DOUBLEFAULT
  98. default y
  99. bool "Enable doublefault exception handler" if EMBEDDED
  100. depends on X86_32
  101. help
  102. This option allows trapping of rare doublefault exceptions that
  103. would otherwise cause a system to silently reboot. Disabling this
  104. option saves about 4k and might cause you much additional grey
  105. hair.
  106. config IOMMU_DEBUG
  107. bool "Enable IOMMU debugging"
  108. depends on GART_IOMMU && DEBUG_KERNEL
  109. depends on X86_64
  110. help
  111. Force the IOMMU to on even when you have less than 4GB of
  112. memory and add debugging code. On overflow always panic. And
  113. allow to enable IOMMU leak tracing. Can be disabled at boot
  114. time with iommu=noforce. This will also enable scatter gather
  115. list merging. Currently not recommended for production
  116. code. When you use it make sure you have a big enough
  117. IOMMU/AGP aperture. Most of the options enabled by this can
  118. be set more finegrained using the iommu= command line
  119. options. See Documentation/x86_64/boot-options.txt for more
  120. details.
  121. config IOMMU_LEAK
  122. bool "IOMMU leak tracing"
  123. depends on DEBUG_KERNEL
  124. depends on IOMMU_DEBUG
  125. help
  126. Add a simple leak tracer to the IOMMU code. This is useful when you
  127. are debugging a buggy device driver that leaks IOMMU mappings.
  128. #
  129. # IO delay types:
  130. #
  131. config IO_DELAY_TYPE_0X80
  132. int
  133. default "0"
  134. config IO_DELAY_TYPE_0XED
  135. int
  136. default "1"
  137. config IO_DELAY_TYPE_UDELAY
  138. int
  139. default "2"
  140. config IO_DELAY_TYPE_NONE
  141. int
  142. default "3"
  143. choice
  144. prompt "IO delay type"
  145. default IO_DELAY_0X80
  146. config IO_DELAY_0X80
  147. bool "port 0x80 based port-IO delay [recommended]"
  148. help
  149. This is the traditional Linux IO delay used for in/out_p.
  150. It is the most tested hence safest selection here.
  151. config IO_DELAY_0XED
  152. bool "port 0xed based port-IO delay"
  153. help
  154. Use port 0xed as the IO delay. This frees up port 0x80 which is
  155. often used as a hardware-debug port.
  156. config IO_DELAY_UDELAY
  157. bool "udelay based port-IO delay"
  158. help
  159. Use udelay(2) as the IO delay method. This provides the delay
  160. while not having any side-effect on the IO port space.
  161. config IO_DELAY_NONE
  162. bool "no port-IO delay"
  163. help
  164. No port-IO delay. Will break on old boxes that require port-IO
  165. delay for certain operations. Should work on most new machines.
  166. endchoice
  167. if IO_DELAY_0X80
  168. config DEFAULT_IO_DELAY_TYPE
  169. int
  170. default IO_DELAY_TYPE_0X80
  171. endif
  172. if IO_DELAY_0XED
  173. config DEFAULT_IO_DELAY_TYPE
  174. int
  175. default IO_DELAY_TYPE_0XED
  176. endif
  177. if IO_DELAY_UDELAY
  178. config DEFAULT_IO_DELAY_TYPE
  179. int
  180. default IO_DELAY_TYPE_UDELAY
  181. endif
  182. if IO_DELAY_NONE
  183. config DEFAULT_IO_DELAY_TYPE
  184. int
  185. default IO_DELAY_TYPE_NONE
  186. endif
  187. config DEBUG_BOOT_PARAMS
  188. bool "Debug boot parameters"
  189. depends on DEBUG_KERNEL
  190. depends on DEBUG_FS
  191. help
  192. This option will cause struct boot_params to be exported via debugfs.
  193. config CPA_DEBUG
  194. bool "CPA self-test code"
  195. depends on DEBUG_KERNEL
  196. help
  197. Do change_page_attr() self-tests every 30 seconds.
  198. endmenu