diff options
| -rw-r--r-- | lib/Kconfig.debug | 549 |
1 files changed, 277 insertions, 272 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index cc443bc6edfc..57e18ac6ca3c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -162,6 +162,283 @@ config DEBUG_KERNEL | |||
| 162 | Say Y here if you are developing drivers or trying to debug and | 162 | Say Y here if you are developing drivers or trying to debug and |
| 163 | identify kernel problems. | 163 | identify kernel problems. |
| 164 | 164 | ||
| 165 | menu "Memory Debugging" | ||
| 166 | |||
| 167 | source mm/Kconfig.debug | ||
| 168 | |||
| 169 | config DEBUG_OBJECTS | ||
| 170 | bool "Debug object operations" | ||
| 171 | depends on DEBUG_KERNEL | ||
| 172 | help | ||
| 173 | If you say Y here, additional code will be inserted into the | ||
| 174 | kernel to track the life time of various objects and validate | ||
| 175 | the operations on those objects. | ||
| 176 | |||
| 177 | config DEBUG_OBJECTS_SELFTEST | ||
| 178 | bool "Debug objects selftest" | ||
| 179 | depends on DEBUG_OBJECTS | ||
| 180 | help | ||
| 181 | This enables the selftest of the object debug code. | ||
| 182 | |||
| 183 | config DEBUG_OBJECTS_FREE | ||
| 184 | bool "Debug objects in freed memory" | ||
| 185 | depends on DEBUG_OBJECTS | ||
| 186 | help | ||
| 187 | This enables checks whether a k/v free operation frees an area | ||
| 188 | which contains an object which has not been deactivated | ||
| 189 | properly. This can make kmalloc/kfree-intensive workloads | ||
| 190 | much slower. | ||
| 191 | |||
| 192 | config DEBUG_OBJECTS_TIMERS | ||
| 193 | bool "Debug timer objects" | ||
| 194 | depends on DEBUG_OBJECTS | ||
| 195 | help | ||
| 196 | If you say Y here, additional code will be inserted into the | ||
| 197 | timer routines to track the life time of timer objects and | ||
| 198 | validate the timer operations. | ||
| 199 | |||
| 200 | config DEBUG_OBJECTS_WORK | ||
| 201 | bool "Debug work objects" | ||
| 202 | depends on DEBUG_OBJECTS | ||
| 203 | help | ||
| 204 | If you say Y here, additional code will be inserted into the | ||
| 205 | work queue routines to track the life time of work objects and | ||
| 206 | validate the work operations. | ||
| 207 | |||
| 208 | config DEBUG_OBJECTS_RCU_HEAD | ||
| 209 | bool "Debug RCU callbacks objects" | ||
| 210 | depends on DEBUG_OBJECTS | ||
| 211 | help | ||
| 212 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
| 213 | |||
| 214 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
| 215 | bool "Debug percpu counter objects" | ||
| 216 | depends on DEBUG_OBJECTS | ||
| 217 | help | ||
| 218 | If you say Y here, additional code will be inserted into the | ||
| 219 | percpu counter routines to track the life time of percpu counter | ||
| 220 | objects and validate the percpu counter operations. | ||
| 221 | |||
| 222 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
| 223 | int "debug_objects bootup default value (0-1)" | ||
| 224 | range 0 1 | ||
| 225 | default "1" | ||
| 226 | depends on DEBUG_OBJECTS | ||
| 227 | help | ||
| 228 | Debug objects boot parameter default value | ||
| 229 | |||
| 230 | config DEBUG_SLAB | ||
| 231 | bool "Debug slab memory allocations" | ||
| 232 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
| 233 | help | ||
| 234 | Say Y here to have the kernel do limited verification on memory | ||
| 235 | allocation as well as poisoning memory on free to catch use of freed | ||
| 236 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
| 237 | |||
| 238 | config DEBUG_SLAB_LEAK | ||
| 239 | bool "Memory leak debugging" | ||
| 240 | depends on DEBUG_SLAB | ||
| 241 | |||
| 242 | config SLUB_DEBUG_ON | ||
| 243 | bool "SLUB debugging on by default" | ||
| 244 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
| 245 | default n | ||
| 246 | help | ||
| 247 | Boot with debugging on by default. SLUB boots by default with | ||
| 248 | the runtime debug capabilities switched off. Enabling this is | ||
| 249 | equivalent to specifying the "slub_debug" parameter on boot. | ||
| 250 | There is no support for more fine grained debug control like | ||
| 251 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
| 252 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
| 253 | "slub_debug=-". | ||
| 254 | |||
| 255 | config SLUB_STATS | ||
| 256 | default n | ||
| 257 | bool "Enable SLUB performance statistics" | ||
| 258 | depends on SLUB && SYSFS | ||
| 259 | help | ||
| 260 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
| 261 | order find ways to optimize the allocator. This should never be | ||
| 262 | enabled for production use since keeping statistics slows down | ||
| 263 | the allocator by a few percentage points. The slabinfo command | ||
| 264 | supports the determination of the most active slabs to figure | ||
| 265 | out which slabs are relevant to a particular load. | ||
| 266 | Try running: slabinfo -DA | ||
| 267 | |||
| 268 | config HAVE_DEBUG_KMEMLEAK | ||
| 269 | bool | ||
| 270 | |||
| 271 | config DEBUG_KMEMLEAK | ||
| 272 | bool "Kernel memory leak detector" | ||
| 273 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
| 274 | select DEBUG_FS | ||
| 275 | select STACKTRACE if STACKTRACE_SUPPORT | ||
| 276 | select KALLSYMS | ||
| 277 | select CRC32 | ||
| 278 | help | ||
| 279 | Say Y here if you want to enable the memory leak | ||
| 280 | detector. The memory allocation/freeing is traced in a way | ||
| 281 | similar to the Boehm's conservative garbage collector, the | ||
| 282 | difference being that the orphan objects are not freed but | ||
| 283 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
| 284 | feature will introduce an overhead to memory | ||
| 285 | allocations. See Documentation/kmemleak.txt for more | ||
| 286 | details. | ||
| 287 | |||
| 288 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
| 289 | of finding leaks due to the slab objects poisoning. | ||
| 290 | |||
| 291 | In order to access the kmemleak file, debugfs needs to be | ||
| 292 | mounted (usually at /sys/kernel/debug). | ||
| 293 | |||
| 294 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
| 295 | int "Maximum kmemleak early log entries" | ||
| 296 | depends on DEBUG_KMEMLEAK | ||
| 297 | range 200 40000 | ||
| 298 | default 400 | ||
| 299 | help | ||
| 300 | Kmemleak must track all the memory allocations to avoid | ||
| 301 | reporting false positives. Since memory may be allocated or | ||
| 302 | freed before kmemleak is initialised, an early log buffer is | ||
| 303 | used to store these actions. If kmemleak reports "early log | ||
| 304 | buffer exceeded", please increase this value. | ||
| 305 | |||
| 306 | config DEBUG_KMEMLEAK_TEST | ||
| 307 | tristate "Simple test for the kernel memory leak detector" | ||
| 308 | depends on DEBUG_KMEMLEAK && m | ||
| 309 | help | ||
| 310 | This option enables a module that explicitly leaks memory. | ||
| 311 | |||
| 312 | If unsure, say N. | ||
| 313 | |||
| 314 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
| 315 | bool "Default kmemleak to off" | ||
| 316 | depends on DEBUG_KMEMLEAK | ||
| 317 | help | ||
| 318 | Say Y here to disable kmemleak by default. It can then be enabled | ||
| 319 | on the command line via kmemleak=on. | ||
| 320 | |||
| 321 | config DEBUG_STACK_USAGE | ||
| 322 | bool "Stack utilization instrumentation" | ||
| 323 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
| 324 | help | ||
| 325 | Enables the display of the minimum amount of free stack which each | ||
| 326 | task has ever had available in the sysrq-T and sysrq-P debug output. | ||
| 327 | |||
| 328 | This option will slow down process creation somewhat. | ||
| 329 | |||
| 330 | config DEBUG_VM | ||
| 331 | bool "Debug VM" | ||
| 332 | depends on DEBUG_KERNEL | ||
| 333 | help | ||
| 334 | Enable this to turn on extended checks in the virtual-memory system | ||
| 335 | that may impact performance. | ||
| 336 | |||
| 337 | If unsure, say N. | ||
| 338 | |||
| 339 | config DEBUG_VM_RB | ||
| 340 | bool "Debug VM red-black trees" | ||
| 341 | depends on DEBUG_VM | ||
| 342 | help | ||
| 343 | Enable this to turn on more extended checks in the virtual-memory | ||
| 344 | system that may impact performance. | ||
| 345 | |||
| 346 | If unsure, say N. | ||
| 347 | |||
| 348 | config DEBUG_VIRTUAL | ||
| 349 | bool "Debug VM translations" | ||
| 350 | depends on DEBUG_KERNEL && X86 | ||
| 351 | help | ||
| 352 | Enable some costly sanity checks in virtual to page code. This can | ||
| 353 | catch mistakes with virt_to_page() and friends. | ||
| 354 | |||
| 355 | If unsure, say N. | ||
| 356 | |||
| 357 | config DEBUG_NOMMU_REGIONS | ||
| 358 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
| 359 | depends on DEBUG_KERNEL && !MMU | ||
| 360 | help | ||
| 361 | This option causes the global tree of anonymous and private mapping | ||
| 362 | regions to be regularly checked for invalid topology. | ||
| 363 | |||
| 364 | config DEBUG_MEMORY_INIT | ||
| 365 | bool "Debug memory initialisation" if EXPERT | ||
| 366 | default !EXPERT | ||
| 367 | help | ||
| 368 | Enable this for additional checks during memory initialisation. | ||
| 369 | The sanity checks verify aspects of the VM such as the memory model | ||
| 370 | and other information provided by the architecture. Verbose | ||
| 371 | information will be printed at KERN_DEBUG loglevel depending | ||
| 372 | on the mminit_loglevel= command-line option. | ||
| 373 | |||
| 374 | If unsure, say Y | ||
| 375 | |||
| 376 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
| 377 | tristate "Memory hotplug notifier error injection module" | ||
| 378 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
| 379 | help | ||
| 380 | This option provides the ability to inject artificial errors to | ||
| 381 | memory hotplug notifier chain callbacks. It is controlled through | ||
| 382 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
| 383 | |||
| 384 | If the notifier call chain should be failed with some events | ||
| 385 | notified, write the error code to "actions/<notifier event>/error". | ||
| 386 | |||
| 387 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
| 388 | |||
| 389 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
| 390 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
| 391 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
| 392 | bash: echo: write error: Cannot allocate memory | ||
| 393 | |||
| 394 | To compile this code as a module, choose M here: the module will | ||
| 395 | be called memory-notifier-error-inject. | ||
| 396 | |||
| 397 | If unsure, say N. | ||
| 398 | |||
| 399 | config DEBUG_PER_CPU_MAPS | ||
| 400 | bool "Debug access to per_cpu maps" | ||
| 401 | depends on DEBUG_KERNEL | ||
| 402 | depends on SMP | ||
| 403 | help | ||
| 404 | Say Y to verify that the per_cpu map being accessed has | ||
| 405 | been set up. This adds a fair amount of code to kernel memory | ||
| 406 | and decreases performance. | ||
| 407 | |||
| 408 | Say N if unsure. | ||
| 409 | |||
| 410 | config DEBUG_HIGHMEM | ||
| 411 | bool "Highmem debugging" | ||
| 412 | depends on DEBUG_KERNEL && HIGHMEM | ||
| 413 | help | ||
| 414 | This options enables addition error checking for high memory systems. | ||
| 415 | Disable for production systems. | ||
| 416 | |||
| 417 | config HAVE_DEBUG_STACKOVERFLOW | ||
| 418 | bool | ||
| 419 | |||
| 420 | config DEBUG_STACKOVERFLOW | ||
| 421 | bool "Check for stack overflows" | ||
| 422 | depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW | ||
| 423 | ---help--- | ||
| 424 | Say Y here if you want to check for overflows of kernel, IRQ | ||
| 425 | and exception stacks (if your archicture uses them). This | ||
| 426 | option will show detailed messages if free stack space drops | ||
| 427 | below a certain limit. | ||
| 428 | |||
| 429 | These kinds of bugs usually occur when call-chains in the | ||
| 430 | kernel get too deep, especially when interrupts are | ||
| 431 | involved. | ||
| 432 | |||
| 433 | Use this in cases where you see apparently random memory | ||
| 434 | corruption, especially if it appears in 'struct thread_info' | ||
| 435 | |||
| 436 | If in doubt, say "N". | ||
| 437 | |||
| 438 | source "lib/Kconfig.kmemcheck" | ||
| 439 | |||
| 440 | endmenu # "Memory Debugging" | ||
| 441 | |||
| 165 | config DEBUG_SHIRQ | 442 | config DEBUG_SHIRQ |
| 166 | bool "Debug shared IRQ handlers" | 443 | bool "Debug shared IRQ handlers" |
| 167 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS | 444 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS |
| @@ -350,158 +627,6 @@ config TIMER_STATS | |||
| 350 | (it defaults to deactivated on bootup and will only be activated | 627 | (it defaults to deactivated on bootup and will only be activated |
| 351 | if some application like powertop activates it explicitly). | 628 | if some application like powertop activates it explicitly). |
| 352 | 629 | ||
| 353 | config DEBUG_OBJECTS | ||
| 354 | bool "Debug object operations" | ||
| 355 | depends on DEBUG_KERNEL | ||
| 356 | help | ||
| 357 | If you say Y here, additional code will be inserted into the | ||
| 358 | kernel to track the life time of various objects and validate | ||
| 359 | the operations on those objects. | ||
| 360 | |||
| 361 | config DEBUG_OBJECTS_SELFTEST | ||
| 362 | bool "Debug objects selftest" | ||
| 363 | depends on DEBUG_OBJECTS | ||
| 364 | help | ||
| 365 | This enables the selftest of the object debug code. | ||
| 366 | |||
| 367 | config DEBUG_OBJECTS_FREE | ||
| 368 | bool "Debug objects in freed memory" | ||
| 369 | depends on DEBUG_OBJECTS | ||
| 370 | help | ||
| 371 | This enables checks whether a k/v free operation frees an area | ||
| 372 | which contains an object which has not been deactivated | ||
| 373 | properly. This can make kmalloc/kfree-intensive workloads | ||
| 374 | much slower. | ||
| 375 | |||
| 376 | config DEBUG_OBJECTS_TIMERS | ||
| 377 | bool "Debug timer objects" | ||
| 378 | depends on DEBUG_OBJECTS | ||
| 379 | help | ||
| 380 | If you say Y here, additional code will be inserted into the | ||
| 381 | timer routines to track the life time of timer objects and | ||
| 382 | validate the timer operations. | ||
| 383 | |||
| 384 | config DEBUG_OBJECTS_WORK | ||
| 385 | bool "Debug work objects" | ||
| 386 | depends on DEBUG_OBJECTS | ||
| 387 | help | ||
| 388 | If you say Y here, additional code will be inserted into the | ||
| 389 | work queue routines to track the life time of work objects and | ||
| 390 | validate the work operations. | ||
| 391 | |||
| 392 | config DEBUG_OBJECTS_RCU_HEAD | ||
| 393 | bool "Debug RCU callbacks objects" | ||
| 394 | depends on DEBUG_OBJECTS | ||
| 395 | help | ||
| 396 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
| 397 | |||
| 398 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
| 399 | bool "Debug percpu counter objects" | ||
| 400 | depends on DEBUG_OBJECTS | ||
| 401 | help | ||
| 402 | If you say Y here, additional code will be inserted into the | ||
| 403 | percpu counter routines to track the life time of percpu counter | ||
| 404 | objects and validate the percpu counter operations. | ||
| 405 | |||
| 406 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
| 407 | int "debug_objects bootup default value (0-1)" | ||
| 408 | range 0 1 | ||
| 409 | default "1" | ||
| 410 | depends on DEBUG_OBJECTS | ||
| 411 | help | ||
| 412 | Debug objects boot parameter default value | ||
| 413 | |||
| 414 | config DEBUG_SLAB | ||
| 415 | bool "Debug slab memory allocations" | ||
| 416 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
| 417 | help | ||
| 418 | Say Y here to have the kernel do limited verification on memory | ||
| 419 | allocation as well as poisoning memory on free to catch use of freed | ||
| 420 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
| 421 | |||
| 422 | config DEBUG_SLAB_LEAK | ||
| 423 | bool "Memory leak debugging" | ||
| 424 | depends on DEBUG_SLAB | ||
| 425 | |||
| 426 | config SLUB_DEBUG_ON | ||
| 427 | bool "SLUB debugging on by default" | ||
| 428 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
| 429 | default n | ||
| 430 | help | ||
| 431 | Boot with debugging on by default. SLUB boots by default with | ||
| 432 | the runtime debug capabilities switched off. Enabling this is | ||
| 433 | equivalent to specifying the "slub_debug" parameter on boot. | ||
| 434 | There is no support for more fine grained debug control like | ||
| 435 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
| 436 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
| 437 | "slub_debug=-". | ||
| 438 | |||
| 439 | config SLUB_STATS | ||
| 440 | default n | ||
| 441 | bool "Enable SLUB performance statistics" | ||
| 442 | depends on SLUB && SYSFS | ||
| 443 | help | ||
| 444 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
| 445 | order find ways to optimize the allocator. This should never be | ||
| 446 | enabled for production use since keeping statistics slows down | ||
| 447 | the allocator by a few percentage points. The slabinfo command | ||
| 448 | supports the determination of the most active slabs to figure | ||
| 449 | out which slabs are relevant to a particular load. | ||
| 450 | Try running: slabinfo -DA | ||
| 451 | |||
| 452 | config HAVE_DEBUG_KMEMLEAK | ||
| 453 | bool | ||
| 454 | |||
| 455 | config DEBUG_KMEMLEAK | ||
| 456 | bool "Kernel memory leak detector" | ||
| 457 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
| 458 | select DEBUG_FS | ||
| 459 | select STACKTRACE if STACKTRACE_SUPPORT | ||
| 460 | select KALLSYMS | ||
| 461 | select CRC32 | ||
| 462 | help | ||
| 463 | Say Y here if you want to enable the memory leak | ||
| 464 | detector. The memory allocation/freeing is traced in a way | ||
| 465 | similar to the Boehm's conservative garbage collector, the | ||
| 466 | difference being that the orphan objects are not freed but | ||
| 467 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
| 468 | feature will introduce an overhead to memory | ||
| 469 | allocations. See Documentation/kmemleak.txt for more | ||
| 470 | details. | ||
| 471 | |||
| 472 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
| 473 | of finding leaks due to the slab objects poisoning. | ||
| 474 | |||
| 475 | In order to access the kmemleak file, debugfs needs to be | ||
| 476 | mounted (usually at /sys/kernel/debug). | ||
| 477 | |||
| 478 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
| 479 | int "Maximum kmemleak early log entries" | ||
| 480 | depends on DEBUG_KMEMLEAK | ||
| 481 | range 200 40000 | ||
| 482 | default 400 | ||
| 483 | help | ||
| 484 | Kmemleak must track all the memory allocations to avoid | ||
| 485 | reporting false positives. Since memory may be allocated or | ||
| 486 | freed before kmemleak is initialised, an early log buffer is | ||
| 487 | used to store these actions. If kmemleak reports "early log | ||
| 488 | buffer exceeded", please increase this value. | ||
| 489 | |||
| 490 | config DEBUG_KMEMLEAK_TEST | ||
| 491 | tristate "Simple test for the kernel memory leak detector" | ||
| 492 | depends on DEBUG_KMEMLEAK && m | ||
| 493 | help | ||
| 494 | This option enables a module that explicitly leaks memory. | ||
| 495 | |||
| 496 | If unsure, say N. | ||
| 497 | |||
| 498 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
| 499 | bool "Default kmemleak to off" | ||
| 500 | depends on DEBUG_KMEMLEAK | ||
| 501 | help | ||
| 502 | Say Y here to disable kmemleak by default. It can then be enabled | ||
| 503 | on the command line via kmemleak=on. | ||
| 504 | |||
| 505 | config DEBUG_PREEMPT | 630 | config DEBUG_PREEMPT |
| 506 | bool "Debug preemptible kernel" | 631 | bool "Debug preemptible kernel" |
| 507 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT | 632 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT |
| @@ -672,15 +797,6 @@ config STACKTRACE | |||
| 672 | bool | 797 | bool |
| 673 | depends on STACKTRACE_SUPPORT | 798 | depends on STACKTRACE_SUPPORT |
| 674 | 799 | ||
| 675 | config DEBUG_STACK_USAGE | ||
| 676 | bool "Stack utilization instrumentation" | ||
| 677 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
| 678 | help | ||
| 679 | Enables the display of the minimum amount of free stack which each | ||
| 680 | task has ever had available in the sysrq-T and sysrq-P debug output. | ||
| 681 | |||
| 682 | This option will slow down process creation somewhat. | ||
| 683 | |||
| 684 | config DEBUG_KOBJECT | 800 | config DEBUG_KOBJECT |
| 685 | bool "kobject debugging" | 801 | bool "kobject debugging" |
| 686 | depends on DEBUG_KERNEL | 802 | depends on DEBUG_KERNEL |
| @@ -688,13 +804,6 @@ config DEBUG_KOBJECT | |||
| 688 | If you say Y here, some extra kobject debugging messages will be sent | 804 | If you say Y here, some extra kobject debugging messages will be sent |
| 689 | to the syslog. | 805 | to the syslog. |
| 690 | 806 | ||
| 691 | config DEBUG_HIGHMEM | ||
| 692 | bool "Highmem debugging" | ||
| 693 | depends on DEBUG_KERNEL && HIGHMEM | ||
| 694 | help | ||
| 695 | This options enables addition error checking for high memory systems. | ||
| 696 | Disable for production systems. | ||
| 697 | |||
| 698 | config HAVE_DEBUG_BUGVERBOSE | 807 | config HAVE_DEBUG_BUGVERBOSE |
| 699 | bool | 808 | bool |
| 700 | 809 | ||
| @@ -733,40 +842,6 @@ config DEBUG_INFO_REDUCED | |||
| 733 | DEBUG_INFO build and compile times are reduced too. | 842 | DEBUG_INFO build and compile times are reduced too. |
| 734 | Only works with newer gcc versions. | 843 | Only works with newer gcc versions. |
| 735 | 844 | ||
| 736 | config DEBUG_VM | ||
| 737 | bool "Debug VM" | ||
| 738 | depends on DEBUG_KERNEL | ||
| 739 | help | ||
| 740 | Enable this to turn on extended checks in the virtual-memory system | ||
| 741 | that may impact performance. | ||
| 742 | |||
| 743 | If unsure, say N. | ||
| 744 | |||
| 745 | config DEBUG_VM_RB | ||
| 746 | bool "Debug VM red-black trees" | ||
| 747 | depends on DEBUG_VM | ||
| 748 | help | ||
| 749 | Enable this to turn on more extended checks in the virtual-memory | ||
| 750 | system that may impact performance. | ||
| 751 | |||
| 752 | If unsure, say N. | ||
| 753 | |||
| 754 | config DEBUG_VIRTUAL | ||
| 755 | bool "Debug VM translations" | ||
| 756 | depends on DEBUG_KERNEL && X86 | ||
| 757 | help | ||
| 758 | Enable some costly sanity checks in virtual to page code. This can | ||
| 759 | catch mistakes with virt_to_page() and friends. | ||
| 760 | |||
| 761 | If unsure, say N. | ||
| 762 | |||
| 763 | config DEBUG_NOMMU_REGIONS | ||
| 764 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
| 765 | depends on DEBUG_KERNEL && !MMU | ||
| 766 | help | ||
| 767 | This option causes the global tree of anonymous and private mapping | ||
| 768 | regions to be regularly checked for invalid topology. | ||
| 769 | |||
| 770 | config DEBUG_WRITECOUNT | 845 | config DEBUG_WRITECOUNT |
| 771 | bool "Debug filesystem writers count" | 846 | bool "Debug filesystem writers count" |
| 772 | depends on DEBUG_KERNEL | 847 | depends on DEBUG_KERNEL |
| @@ -777,18 +852,6 @@ config DEBUG_WRITECOUNT | |||
| 777 | 852 | ||
| 778 | If unsure, say N. | 853 | If unsure, say N. |
| 779 | 854 | ||
| 780 | config DEBUG_MEMORY_INIT | ||
| 781 | bool "Debug memory initialisation" if EXPERT | ||
| 782 | default !EXPERT | ||
| 783 | help | ||
| 784 | Enable this for additional checks during memory initialisation. | ||
| 785 | The sanity checks verify aspects of the VM such as the memory model | ||
| 786 | and other information provided by the architecture. Verbose | ||
| 787 | information will be printed at KERN_DEBUG loglevel depending | ||
| 788 | on the mminit_loglevel= command-line option. | ||
| 789 | |||
| 790 | If unsure, say Y | ||
| 791 | |||
| 792 | config DEBUG_LIST | 855 | config DEBUG_LIST |
| 793 | bool "Debug linked list manipulation" | 856 | bool "Debug linked list manipulation" |
| 794 | depends on DEBUG_KERNEL | 857 | depends on DEBUG_KERNEL |
| @@ -1088,17 +1151,6 @@ config DEBUG_FORCE_WEAK_PER_CPU | |||
| 1088 | To ensure that generic code follows the above rules, this | 1151 | To ensure that generic code follows the above rules, this |
| 1089 | option forces all percpu variables to be defined as weak. | 1152 | option forces all percpu variables to be defined as weak. |
| 1090 | 1153 | ||
| 1091 | config DEBUG_PER_CPU_MAPS | ||
| 1092 | bool "Debug access to per_cpu maps" | ||
| 1093 | depends on DEBUG_KERNEL | ||
| 1094 | depends on SMP | ||
| 1095 | help | ||
| 1096 | Say Y to verify that the per_cpu map being accessed has | ||
| 1097 | been set up. This adds a fair amount of code to kernel memory | ||
| 1098 | and decreases performance. | ||
| 1099 | |||
| 1100 | Say N if unsure. | ||
| 1101 | |||
| 1102 | config LKDTM | 1154 | config LKDTM |
| 1103 | tristate "Linux Kernel Dump Test Tool Module" | 1155 | tristate "Linux Kernel Dump Test Tool Module" |
| 1104 | depends on DEBUG_FS | 1156 | depends on DEBUG_FS |
| @@ -1173,29 +1225,6 @@ config PM_NOTIFIER_ERROR_INJECT | |||
| 1173 | 1225 | ||
| 1174 | If unsure, say N. | 1226 | If unsure, say N. |
| 1175 | 1227 | ||
| 1176 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
| 1177 | tristate "Memory hotplug notifier error injection module" | ||
| 1178 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
| 1179 | help | ||
| 1180 | This option provides the ability to inject artificial errors to | ||
| 1181 | memory hotplug notifier chain callbacks. It is controlled through | ||
| 1182 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
| 1183 | |||
| 1184 | If the notifier call chain should be failed with some events | ||
| 1185 | notified, write the error code to "actions/<notifier event>/error". | ||
| 1186 | |||
| 1187 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
| 1188 | |||
| 1189 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
| 1190 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
| 1191 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
| 1192 | bash: echo: write error: Cannot allocate memory | ||
| 1193 | |||
| 1194 | To compile this code as a module, choose M here: the module will | ||
| 1195 | be called memory-notifier-error-inject. | ||
| 1196 | |||
| 1197 | If unsure, say N. | ||
| 1198 | |||
| 1199 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT | 1228 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT |
| 1200 | tristate "OF reconfig notifier error injection module" | 1229 | tristate "OF reconfig notifier error injection module" |
| 1201 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION | 1230 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION |
| @@ -1310,7 +1339,6 @@ config DEBUG_STRICT_USER_COPY_CHECKS | |||
| 1310 | 1339 | ||
| 1311 | If unsure, say N. | 1340 | If unsure, say N. |
| 1312 | 1341 | ||
| 1313 | source mm/Kconfig.debug | ||
| 1314 | source kernel/trace/Kconfig | 1342 | source kernel/trace/Kconfig |
| 1315 | 1343 | ||
| 1316 | config RBTREE_TEST | 1344 | config RBTREE_TEST |
| @@ -1475,33 +1503,10 @@ config ASYNC_RAID6_TEST | |||
| 1475 | 1503 | ||
| 1476 | If unsure, say N. | 1504 | If unsure, say N. |
| 1477 | 1505 | ||
| 1478 | config HAVE_DEBUG_STACKOVERFLOW | ||
| 1479 | bool | ||
| 1480 | |||
| 1481 | config DEBUG_STACKOVERFLOW | ||
| 1482 | bool "Check for stack overflows" | ||
| 1483 | depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW | ||
| 1484 | ---help--- | ||
| 1485 | Say Y here if you want to check for overflows of kernel, IRQ | ||
| 1486 | and exception stacks (if your archicture uses them). This | ||
| 1487 | option will show detailed messages if free stack space drops | ||
| 1488 | below a certain limit. | ||
| 1489 | |||
| 1490 | These kinds of bugs usually occur when call-chains in the | ||
| 1491 | kernel get too deep, especially when interrupts are | ||
| 1492 | involved. | ||
| 1493 | |||
| 1494 | Use this in cases where you see apparently random memory | ||
| 1495 | corruption, especially if it appears in 'struct thread_info' | ||
| 1496 | |||
| 1497 | If in doubt, say "N". | ||
| 1498 | |||
| 1499 | source "samples/Kconfig" | 1506 | source "samples/Kconfig" |
| 1500 | 1507 | ||
| 1501 | source "lib/Kconfig.kgdb" | 1508 | source "lib/Kconfig.kgdb" |
| 1502 | 1509 | ||
| 1503 | source "lib/Kconfig.kmemcheck" | ||
| 1504 | |||
| 1505 | config TEST_STRING_HELPERS | 1510 | config TEST_STRING_HELPERS |
| 1506 | tristate "Test functions located in the string_helpers module at runtime" | 1511 | tristate "Test functions located in the string_helpers module at runtime" |
| 1507 | 1512 | ||
