Kconfig.debug 6.0 KB

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