Blame view

arch/x86/Kconfig.debug 9.15 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
  menu "Kernel hacking"
55f327fa9   Ingo Molnar   [PATCH] lockdep: ...
2
  config TRACE_IRQFLAGS_SUPPORT
d013a27cb   Randy Dunlap   x86: unification ...
3
  	def_bool y
55f327fa9   Ingo Molnar   [PATCH] lockdep: ...
4

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
5
  source "lib/Kconfig.debug"
d092633bf   Ingo Molnar   Subject: devmem, ...
6
  config STRICT_DEVMEM
16104b550   Stefan Richter   x86: fix CONFIG_N...
7
  	bool "Filter access to /dev/mem"
8f9ca475c   Ingo Molnar   x86: clean up arc...
8
  	---help---
f2d0f1dea   Linus Torvalds   x86: Fix help mes...
9
  	  If this option is disabled, you allow userspace (root) access to all
16104b550   Stefan Richter   x86: fix CONFIG_N...
10
11
  	  of memory, including kernel and userspace memory. Accidental
  	  access to this is obviously disastrous, but specific access can
d092633bf   Ingo Molnar   Subject: devmem, ...
12
13
14
  	  be used by people debugging the kernel. Note that with PAT support
  	  enabled, even in this case there are restrictions on /dev/mem
  	  use due to the cache aliasing requirements.
16104b550   Stefan Richter   x86: fix CONFIG_N...
15
16
17
18
19
20
21
  
  	  If this option is switched on, the /dev/mem file only allows
  	  userspace access to PCI space and the BIOS code and data regions.
  	  This is sufficient for dosemu and X and all common users of
  	  /dev/mem.
  
  	  If in doubt, say Y.
ae531c26c   Arjan van de Ven   x86: introduce /d...
22

6bcb13b35   Ben Collins   x86: config optio...
23
24
25
  config X86_VERBOSE_BOOTUP
  	bool "Enable verbose x86 bootup info messages"
  	default y
8f9ca475c   Ingo Molnar   x86: clean up arc...
26
  	---help---
6bcb13b35   Ben Collins   x86: config optio...
27
28
29
  	  Enables the informational output from the decompression stage
  	  (e.g. bzImage) of the boot. If you disable this you will still
  	  see errors. Disable this if you want silent bootup.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
30
  config EARLY_PRINTK
6a108a14f   David Rientjes   kconfig: rename C...
31
  	bool "Early printk" if EXPERT
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
32
  	default y
8f9ca475c   Ingo Molnar   x86: clean up arc...
33
  	---help---
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
34
35
36
37
38
39
40
41
  	  Write kernel log output directly into the VGA buffer or to a serial
  	  port.
  
  	  This is useful for kernel debugging when your machine crashes very
  	  early before the console code is initialized. For normal operation
  	  it is not recommended because it looks ugly and doesn't cooperate
  	  with klogd/syslogd or the X server. You should normally N here,
  	  unless you want to debug such a crash.
1ea7c6737   Alan Cox   x86/config: Revam...
42
43
44
  config EARLY_PRINTK_INTEL_MID
  	bool "Early printk for Intel MID platform support"
  	depends on EARLY_PRINTK && X86_INTEL_MID
c20b5c331   Feng Tang   x86, earlyprintk:...
45

5c05917e7   Yinghai Lu   x86: usb debug po...
46
47
  config EARLY_PRINTK_DBGP
  	bool "Early printk via EHCI debug port"
9749986a8   Ingo Molnar   x86: usb debug po...
48
  	depends on EARLY_PRINTK && PCI
8f9ca475c   Ingo Molnar   x86: clean up arc...
49
  	---help---
5c05917e7   Yinghai Lu   x86: usb debug po...
50
51
52
53
54
55
56
  	  Write kernel log output directly into the EHCI debug port.
  
  	  This is useful for kernel debugging when your machine crashes very
  	  early before the console code is initialized. For normal operation
  	  it is not recommended because it looks ugly and doesn't cooperate
  	  with klogd/syslogd or the X server. You should normally N here,
  	  unless you want to debug such a crash. You need usb debug device.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
57
58
59
  config DEBUG_STACKOVERFLOW
  	bool "Check for stack overflows"
  	depends on DEBUG_KERNEL
8f9ca475c   Ingo Molnar   x86: clean up arc...
60
  	---help---
37fe6a42b   Mitsuo Hayasaka   x86: Check stack ...
61
62
63
64
65
  	  Say Y here if you want to check the overflows of kernel, IRQ
  	  and exception stacks. This option will cause messages of the
  	  stacks in detail when free stack space drops below a certain
  	  limit.
  	  If in doubt, say "N".
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
66

926e5392b   Arjan van de Ven   x86: add code to ...
67
68
  config X86_PTDUMP
  	bool "Export kernel pagetable layout to userspace via debugfs"
fe770bf03   H. Peter Anvin   x86: clean up the...
69
  	depends on DEBUG_KERNEL
926e5392b   Arjan van de Ven   x86: add code to ...
70
  	select DEBUG_FS
8f9ca475c   Ingo Molnar   x86: clean up arc...
71
  	---help---
926e5392b   Arjan van de Ven   x86: add code to ...
72
73
74
75
76
77
  	  Say Y here if you want to show the kernel pagetable layout in a
  	  debugfs file. This information is only useful for kernel developers
  	  who are working in architecture specific areas of the kernel.
  	  It is probably not a good idea to enable this feature in a production
  	  kernel.
  	  If in doubt, say "N"
63aaf3086   Arjan van de Ven   [PATCH] x86/x86_6...
78
79
  config DEBUG_RODATA
  	bool "Write protect kernel read-only data structures"
11201e603   Ingo Molnar   x86: fix DEBUG_RO...
80
  	default y
63aaf3086   Arjan van de Ven   [PATCH] x86/x86_6...
81
  	depends on DEBUG_KERNEL
8f9ca475c   Ingo Molnar   x86: clean up arc...
82
  	---help---
63aaf3086   Arjan van de Ven   [PATCH] x86/x86_6...
83
84
  	  Mark the kernel read-only data as write-protected in the pagetables,
  	  in order to catch accidental (and incorrect) writes to such const
11201e603   Ingo Molnar   x86: fix DEBUG_RO...
85
86
  	  data. This is recommended so that we can catch kernel bugs sooner.
  	  If in doubt, say "Y".
63aaf3086   Arjan van de Ven   [PATCH] x86/x86_6...
87

aba8391f7   Ingo Molnar   x86: rodata confi...
88
89
90
  config DEBUG_RODATA_TEST
  	bool "Testcase for the DEBUG_RODATA feature"
  	depends on DEBUG_RODATA
72370f2a5   Ingo Molnar   x86: if stackprot...
91
  	default y
8f9ca475c   Ingo Molnar   x86: clean up arc...
92
  	---help---
aba8391f7   Ingo Molnar   x86: rodata confi...
93
94
95
  	  This option enables a testcase for the DEBUG_RODATA
  	  feature as well as for the change_page_attr() infrastructure.
  	  If in doubt, say "N"
84e1c6bb3   Matthieu CASTET   x86: Add RO/NX pr...
96
97
98
99
100
101
102
103
104
105
  config DEBUG_SET_MODULE_RONX
  	bool "Set loadable kernel module data as NX and text as RO"
  	depends on MODULES
  	---help---
  	  This option helps catch unintended modifications to loadable
  	  kernel module's text and read-only data. It also prevents execution
  	  of module data. Such protection may interfere with run-time code
  	  patching and dynamic kernel tracing - and they might also protect
  	  against certain classes of kernel exploits.
  	  If in doubt, say "N".
aba8391f7   Ingo Molnar   x86: rodata confi...
106
107
108
  config DEBUG_NX_TEST
  	tristate "Testcase for the NX non-executable stack feature"
  	depends on DEBUG_KERNEL && m
8f9ca475c   Ingo Molnar   x86: clean up arc...
109
  	---help---
aba8391f7   Ingo Molnar   x86: rodata confi...
110
111
112
  	  This option enables a testcase for the CPU NX capability
  	  and the software setup of this feature.
  	  If in doubt, say "N"
102e41fd9   Andi Kleen   [PATCH] i386: Mov...
113
114
  config DOUBLEFAULT
  	default y
6a108a14f   David Rientjes   kconfig: rename C...
115
  	bool "Enable doublefault exception handler" if EXPERT
d013a27cb   Randy Dunlap   x86: unification ...
116
  	depends on X86_32
8f9ca475c   Ingo Molnar   x86: clean up arc...
117
  	---help---
d013a27cb   Randy Dunlap   x86: unification ...
118
119
120
121
122
123
124
  	  This option allows trapping of rare doublefault exceptions that
  	  would otherwise cause a system to silently reboot. Disabling this
  	  option saves about 4k and might cause you much additional grey
  	  hair.
  
  config IOMMU_DEBUG
  	bool "Enable IOMMU debugging"
966396d3a   Joerg Roedel   x86 gart: rename ...
125
  	depends on GART_IOMMU && DEBUG_KERNEL
d013a27cb   Randy Dunlap   x86: unification ...
126
  	depends on X86_64
8f9ca475c   Ingo Molnar   x86: clean up arc...
127
  	---help---
d013a27cb   Randy Dunlap   x86: unification ...
128
129
130
131
132
133
134
135
  	  Force the IOMMU to on even when you have less than 4GB of
  	  memory and add debugging code. On overflow always panic. And
  	  allow to enable IOMMU leak tracing. Can be disabled at boot
  	  time with iommu=noforce. This will also enable scatter gather
  	  list merging.  Currently not recommended for production
  	  code. When you use it make sure you have a big enough
  	  IOMMU/AGP aperture.  Most of the options enabled by this can
  	  be set more finegrained using the iommu= command line
395cf9691   Paul Bolle   doc: fix broken r...
136
  	  options. See Documentation/x86/x86_64/boot-options.txt for more
d013a27cb   Randy Dunlap   x86: unification ...
137
  	  details.
2be69c79e   Joerg Roedel   x86/iommu: add IO...
138
139
140
141
142
143
144
  config IOMMU_STRESS
  	bool "Enable IOMMU stress-test mode"
  	---help---
  	  This option disables various optimizations in IOMMU related
  	  code to do real stress testing of the IOMMU code. This option
  	  will cause a performance drop and should only be enabled for
  	  testing.
d013a27cb   Randy Dunlap   x86: unification ...
145
146
  config IOMMU_LEAK
  	bool "IOMMU leak tracing"
19c1a6f57   FUJITA Tomonori   x86 gart: reimple...
147
  	depends on IOMMU_DEBUG && DMA_API_DEBUG
8f9ca475c   Ingo Molnar   x86: clean up arc...
148
  	---help---
d013a27cb   Randy Dunlap   x86: unification ...
149
150
  	  Add a simple leak tracer to the IOMMU code. This is useful when you
  	  are debugging a buggy device driver that leaks IOMMU mappings.
6bc5c366b   Pekka Paalanen   trace: mmiotrace ...
151
152
  config HAVE_MMIOTRACE_SUPPORT
  	def_bool y
8b7d89d02   Pekka Paalanen   x86: mmiotrace - ...
153

ca0e9badd   Masami Hiramatsu   x86: X86 instruct...
154
  config X86_DECODER_SELFTEST
cbe5c34c8   OGAWA Hirofumi   x86: Compile insn...
155
156
  	bool "x86 instruction decoder selftest"
  	depends on DEBUG_KERNEL && KPROBES
ca0e9badd   Masami Hiramatsu   x86: X86 instruct...
157
158
159
160
161
  	---help---
  	 Perform x86 instruction decoder selftests at build time.
  	 This option is useful for checking the sanity of x86 instruction
  	 decoder code.
  	 If unsure, say "N".
6e7c40259   Ingo Molnar   x86: various chan...
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
  #
  # IO delay types:
  #
  
  config IO_DELAY_TYPE_0X80
  	int
  	default "0"
  
  config IO_DELAY_TYPE_0XED
  	int
  	default "1"
  
  config IO_DELAY_TYPE_UDELAY
  	int
  	default "2"
  
  config IO_DELAY_TYPE_NONE
  	int
  	default "3"
  
  choice
  	prompt "IO delay type"
fd59e9e9c   Ingo Molnar   x86: change IO de...
184
  	default IO_DELAY_0X80
6e7c40259   Ingo Molnar   x86: various chan...
185
186
187
  
  config IO_DELAY_0X80
  	bool "port 0x80 based port-IO delay [recommended]"
8f9ca475c   Ingo Molnar   x86: clean up arc...
188
  	---help---
6e7c40259   Ingo Molnar   x86: various chan...
189
190
191
192
193
  	  This is the traditional Linux IO delay used for in/out_p.
  	  It is the most tested hence safest selection here.
  
  config IO_DELAY_0XED
  	bool "port 0xed based port-IO delay"
8f9ca475c   Ingo Molnar   x86: clean up arc...
194
  	---help---
6e7c40259   Ingo Molnar   x86: various chan...
195
196
197
198
199
  	  Use port 0xed as the IO delay. This frees up port 0x80 which is
  	  often used as a hardware-debug port.
  
  config IO_DELAY_UDELAY
  	bool "udelay based port-IO delay"
8f9ca475c   Ingo Molnar   x86: clean up arc...
200
  	---help---
6e7c40259   Ingo Molnar   x86: various chan...
201
202
203
204
205
  	  Use udelay(2) as the IO delay method. This provides the delay
  	  while not having any side-effect on the IO port space.
  
  config IO_DELAY_NONE
  	bool "no port-IO delay"
8f9ca475c   Ingo Molnar   x86: clean up arc...
206
  	---help---
6e7c40259   Ingo Molnar   x86: various chan...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
  	  No port-IO delay. Will break on old boxes that require port-IO
  	  delay for certain operations. Should work on most new machines.
  
  endchoice
  
  if IO_DELAY_0X80
  config DEFAULT_IO_DELAY_TYPE
  	int
  	default IO_DELAY_TYPE_0X80
  endif
  
  if IO_DELAY_0XED
  config DEFAULT_IO_DELAY_TYPE
  	int
  	default IO_DELAY_TYPE_0XED
  endif
  
  if IO_DELAY_UDELAY
  config DEFAULT_IO_DELAY_TYPE
  	int
  	default IO_DELAY_TYPE_UDELAY
  endif
  
  if IO_DELAY_NONE
  config DEFAULT_IO_DELAY_TYPE
  	int
  	default IO_DELAY_TYPE_NONE
  endif
b02aae9cf   Rene Herman   x86: provide a DM...
235

6d7d74337   Huang, Ying   x86 boot : export...
236
237
238
239
  config DEBUG_BOOT_PARAMS
  	bool "Debug boot parameters"
  	depends on DEBUG_KERNEL
  	depends on DEBUG_FS
8f9ca475c   Ingo Molnar   x86: clean up arc...
240
  	---help---
6d7d74337   Huang, Ying   x86 boot : export...
241
  	  This option will cause struct boot_params to be exported via debugfs.
0c42f3927   Andi Kleen   c_p_a(): do a sim...
242
  config CPA_DEBUG
971a52d66   Ingo Molnar   x86: delay CPA se...
243
  	bool "CPA self-test code"
f316fe687   Ingo Molnar   x86: cpa: make se...
244
  	depends on DEBUG_KERNEL
8f9ca475c   Ingo Molnar   x86: clean up arc...
245
  	---help---
971a52d66   Ingo Molnar   x86: delay CPA se...
246
  	  Do change_page_attr() self-tests every 30 seconds.
0c42f3927   Andi Kleen   c_p_a(): do a sim...
247

60a3cdd06   Ingo Molnar   x86: add optimize...
248
249
  config OPTIMIZE_INLINING
  	bool "Allow gcc to uninline functions marked 'inline'"
8f9ca475c   Ingo Molnar   x86: clean up arc...
250
  	---help---
60a3cdd06   Ingo Molnar   x86: add optimize...
251
252
253
254
  	  This option determines if the kernel forces gcc to inline the functions
  	  developers have marked 'inline'. Doing so takes away freedom from gcc to
  	  do what it thinks is best, which is desirable for the gcc 3.x series of
  	  compilers. The gcc 4.x series have a rewritten inlining algorithm and
63fb70859   Sitsofe Wheeler   x86: change OPTIM...
255
256
257
258
  	  enabling this option will generate a smaller kernel there. Hopefully
  	  this algorithm is so good that allowing gcc 4.x and above to make the
  	  decision will become the default in the future. Until then this option
  	  is there to test gcc for this.
c9af1e332   Ingo Molnar   x86: Kconfig fix
259

3f9b5cc01   Ingo Molnar   x86: re-enable OP...
260
  	  If unsure, say N.
63312b6a6   Arjan van de Ven   x86: Add a Kconfi...
261
262
  config DEBUG_STRICT_USER_COPY_CHECKS
  	bool "Strict copy size checks"
ad8f4356a   Arjan van de Ven   x86: Don't use th...
263
  	depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
63312b6a6   Arjan van de Ven   x86: Add a Kconfi...
264
265
266
267
268
269
270
271
272
273
  	---help---
  	  Enabling this option turns a certain set of sanity checks for user
  	  copy operations into compile time failures.
  
  	  The copy_from_user() etc checks are there to help test if there
  	  are sufficient security checks on the length argument of
  	  the copy operation, by having gcc prove that the argument is
  	  within bounds.
  
  	  If unsure, or if you run an older (pre 4.4) gcc, say N.
99e8b9ca9   Don Zickus   x86, NMI: Add NMI...
274
275
  config DEBUG_NMI_SELFTEST
  	bool "NMI Selftest"
4f941c57f   Don Zickus   x86, NMI: NMI sel...
276
  	depends on DEBUG_KERNEL && X86_LOCAL_APIC
99e8b9ca9   Don Zickus   x86, NMI: Add NMI...
277
278
279
280
281
282
283
284
  	---help---
  	  Enabling this option turns on a quick NMI selftest to verify
  	  that the NMI behaves correctly.
  
  	  This might help diagnose strange hangs that rely on NMI to
  	  function properly.
  
  	  If unsure, say N.
c9af1e332   Ingo Molnar   x86: Kconfig fix
285
  endmenu