Kconfig.debug 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. menu "Kernel hacking"
  2. config TRACE_IRQFLAGS_SUPPORT
  3. def_bool y
  4. source "lib/Kconfig.debug"
  5. config NONPROMISC_DEVMEM
  6. bool "Disable promiscuous /dev/mem"
  7. help
  8. The /dev/mem file by default only allows userspace access to PCI
  9. space and the BIOS code and data regions. This is sufficient for
  10. dosemu and X and all common users of /dev/mem. With this config
  11. option, you allow userspace access to all of memory, including
  12. kernel and userspace memory. Accidental access to this is
  13. obviously disasterous, but specific access can be used by people
  14. debugging the kernel.
  15. config X86_VERBOSE_BOOTUP
  16. bool "Enable verbose x86 bootup info messages"
  17. default y
  18. help
  19. Enables the informational output from the decompression stage
  20. (e.g. bzImage) of the boot. If you disable this you will still
  21. see errors. Disable this if you want silent bootup.
  22. config EARLY_PRINTK
  23. bool "Early printk" if EMBEDDED
  24. default y
  25. help
  26. Write kernel log output directly into the VGA buffer or to a serial
  27. port.
  28. This is useful for kernel debugging when your machine crashes very
  29. early before the console code is initialized. For normal operation
  30. it is not recommended because it looks ugly and doesn't cooperate
  31. with klogd/syslogd or the X server. You should normally N here,
  32. unless you want to debug such a crash.
  33. config DEBUG_STACKOVERFLOW
  34. bool "Check for stack overflows"
  35. depends on DEBUG_KERNEL
  36. help
  37. This option will cause messages to be printed if free stack space
  38. drops below a certain limit.
  39. config DEBUG_STACK_USAGE
  40. bool "Stack utilization instrumentation"
  41. depends on DEBUG_KERNEL
  42. help
  43. Enables the display of the minimum amount of free stack which each
  44. task has ever had available in the sysrq-T and sysrq-P debug output.
  45. This option will slow down process creation somewhat.
  46. config DEBUG_PAGEALLOC
  47. bool "Debug page memory allocations"
  48. depends on DEBUG_KERNEL
  49. help
  50. Unmap pages from the kernel linear mapping after free_pages().
  51. This results in a large slowdown, but helps to find certain types
  52. of memory corruptions.
  53. config DEBUG_PER_CPU_MAPS
  54. bool "Debug access to per_cpu maps"
  55. depends on DEBUG_KERNEL
  56. depends on X86_64_SMP
  57. default n
  58. help
  59. Say Y to verify that the per_cpu map being accessed has
  60. been setup. Adds a fair amount of code to kernel memory
  61. and decreases performance.
  62. Say N if unsure.
  63. config X86_PTDUMP
  64. bool "Export kernel pagetable layout to userspace via debugfs"
  65. depends on DEBUG_KERNEL
  66. select DEBUG_FS
  67. help
  68. Say Y here if you want to show the kernel pagetable layout in a
  69. debugfs file. This information is only useful for kernel developers
  70. who are working in architecture specific areas of the kernel.
  71. It is probably not a good idea to enable this feature in a production
  72. kernel.
  73. If in doubt, say "N"
  74. config DEBUG_RODATA
  75. bool "Write protect kernel read-only data structures"
  76. default y
  77. depends on DEBUG_KERNEL
  78. help
  79. Mark the kernel read-only data as write-protected in the pagetables,
  80. in order to catch accidental (and incorrect) writes to such const
  81. data. This is recommended so that we can catch kernel bugs sooner.
  82. If in doubt, say "Y".
  83. config DIRECT_GBPAGES
  84. bool "Enable gbpages-mapped kernel pagetables"
  85. depends on DEBUG_KERNEL && EXPERIMENTAL && X86_64
  86. help
  87. Enable gigabyte pages support (if the CPU supports it). This can
  88. improve the kernel's performance a tiny bit by reducing TLB
  89. pressure.
  90. This is experimental code.
  91. If in doubt, say "N".
  92. config DEBUG_RODATA_TEST
  93. bool "Testcase for the DEBUG_RODATA feature"
  94. depends on DEBUG_RODATA
  95. help
  96. This option enables a testcase for the DEBUG_RODATA
  97. feature as well as for the change_page_attr() infrastructure.
  98. If in doubt, say "N"
  99. config DEBUG_NX_TEST
  100. tristate "Testcase for the NX non-executable stack feature"
  101. depends on DEBUG_KERNEL && m
  102. help
  103. This option enables a testcase for the CPU NX capability
  104. and the software setup of this feature.
  105. If in doubt, say "N"
  106. config 4KSTACKS
  107. bool "Use 4Kb for kernel stacks instead of 8Kb"
  108. depends on X86_32
  109. help
  110. If you say Y here the kernel will use a 4Kb stacksize for the
  111. kernel stack attached to each process/thread. This facilitates
  112. running more threads on a system and also reduces the pressure
  113. on the VM subsystem for higher order allocations. This option
  114. will also use IRQ stacks to compensate for the reduced stackspace.
  115. config X86_FIND_SMP_CONFIG
  116. def_bool y
  117. depends on X86_LOCAL_APIC || X86_VOYAGER
  118. depends on X86_32
  119. config X86_MPPARSE
  120. def_bool y
  121. depends on (X86_32 && (X86_LOCAL_APIC && !X86_VISWS)) || X86_64
  122. config DOUBLEFAULT
  123. default y
  124. bool "Enable doublefault exception handler" if EMBEDDED
  125. depends on X86_32
  126. help
  127. This option allows trapping of rare doublefault exceptions that
  128. would otherwise cause a system to silently reboot. Disabling this
  129. option saves about 4k and might cause you much additional grey
  130. hair.
  131. config IOMMU_DEBUG
  132. bool "Enable IOMMU debugging"
  133. depends on GART_IOMMU && DEBUG_KERNEL
  134. depends on X86_64
  135. help
  136. Force the IOMMU to on even when you have less than 4GB of
  137. memory and add debugging code. On overflow always panic. And
  138. allow to enable IOMMU leak tracing. Can be disabled at boot
  139. time with iommu=noforce. This will also enable scatter gather
  140. list merging. Currently not recommended for production
  141. code. When you use it make sure you have a big enough
  142. IOMMU/AGP aperture. Most of the options enabled by this can
  143. be set more finegrained using the iommu= command line
  144. options. See Documentation/x86_64/boot-options.txt for more
  145. details.
  146. config IOMMU_LEAK
  147. bool "IOMMU leak tracing"
  148. depends on DEBUG_KERNEL
  149. depends on IOMMU_DEBUG
  150. help
  151. Add a simple leak tracer to the IOMMU code. This is useful when you
  152. are debugging a buggy device driver that leaks IOMMU mappings.
  153. #
  154. # IO delay types:
  155. #
  156. config IO_DELAY_TYPE_0X80
  157. int
  158. default "0"
  159. config IO_DELAY_TYPE_0XED
  160. int
  161. default "1"
  162. config IO_DELAY_TYPE_UDELAY
  163. int
  164. default "2"
  165. config IO_DELAY_TYPE_NONE
  166. int
  167. default "3"
  168. choice
  169. prompt "IO delay type"
  170. default IO_DELAY_0X80
  171. config IO_DELAY_0X80
  172. bool "port 0x80 based port-IO delay [recommended]"
  173. help
  174. This is the traditional Linux IO delay used for in/out_p.
  175. It is the most tested hence safest selection here.
  176. config IO_DELAY_0XED
  177. bool "port 0xed based port-IO delay"
  178. help
  179. Use port 0xed as the IO delay. This frees up port 0x80 which is
  180. often used as a hardware-debug port.
  181. config IO_DELAY_UDELAY
  182. bool "udelay based port-IO delay"
  183. help
  184. Use udelay(2) as the IO delay method. This provides the delay
  185. while not having any side-effect on the IO port space.
  186. config IO_DELAY_NONE
  187. bool "no port-IO delay"
  188. help
  189. No port-IO delay. Will break on old boxes that require port-IO
  190. delay for certain operations. Should work on most new machines.
  191. endchoice
  192. if IO_DELAY_0X80
  193. config DEFAULT_IO_DELAY_TYPE
  194. int
  195. default IO_DELAY_TYPE_0X80
  196. endif
  197. if IO_DELAY_0XED
  198. config DEFAULT_IO_DELAY_TYPE
  199. int
  200. default IO_DELAY_TYPE_0XED
  201. endif
  202. if IO_DELAY_UDELAY
  203. config DEFAULT_IO_DELAY_TYPE
  204. int
  205. default IO_DELAY_TYPE_UDELAY
  206. endif
  207. if IO_DELAY_NONE
  208. config DEFAULT_IO_DELAY_TYPE
  209. int
  210. default IO_DELAY_TYPE_NONE
  211. endif
  212. config DEBUG_BOOT_PARAMS
  213. bool "Debug boot parameters"
  214. depends on DEBUG_KERNEL
  215. depends on DEBUG_FS
  216. help
  217. This option will cause struct boot_params to be exported via debugfs.
  218. config CPA_DEBUG
  219. bool "CPA self-test code"
  220. depends on DEBUG_KERNEL
  221. help
  222. Do change_page_attr() self-tests every 30 seconds.
  223. config OPTIMIZE_INLINING
  224. bool "Allow gcc to uninline functions marked 'inline'"
  225. depends on BROKEN
  226. help
  227. This option determines if the kernel forces gcc to inline the functions
  228. developers have marked 'inline'. Doing so takes away freedom from gcc to
  229. do what it thinks is best, which is desirable for the gcc 3.x series of
  230. compilers. The gcc 4.x series have a rewritten inlining algorithm and
  231. disabling this option will generate a smaller kernel there. Hopefully
  232. this algorithm is so good that allowing gcc4 to make the decision can
  233. become the default in the future, until then this option is there to
  234. test gcc for this.
  235. endmenu