Kconfig.kmemcheck 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. config HAVE_ARCH_KMEMCHECK
  2. bool
  3. if HAVE_ARCH_KMEMCHECK
  4. menuconfig KMEMCHECK
  5. bool "kmemcheck: trap use of uninitialized memory"
  6. depends on DEBUG_KERNEL
  7. depends on !X86_USE_3DNOW
  8. depends on SLUB || SLAB
  9. depends on !CC_OPTIMIZE_FOR_SIZE
  10. depends on !FUNCTION_TRACER
  11. select FRAME_POINTER
  12. select STACKTRACE
  13. default n
  14. help
  15. This option enables tracing of dynamically allocated kernel memory
  16. to see if memory is used before it has been given an initial value.
  17. Be aware that this requires half of your memory for bookkeeping and
  18. will insert extra code at *every* read and write to tracked memory
  19. thus slow down the kernel code (but user code is unaffected).
  20. The kernel may be started with kmemcheck=0 or kmemcheck=1 to disable
  21. or enable kmemcheck at boot-time. If the kernel is started with
  22. kmemcheck=0, the large memory and CPU overhead is not incurred.
  23. choice
  24. prompt "kmemcheck: default mode at boot"
  25. depends on KMEMCHECK
  26. default KMEMCHECK_ONESHOT_BY_DEFAULT
  27. help
  28. This option controls the default behaviour of kmemcheck when the
  29. kernel boots and no kmemcheck= parameter is given.
  30. config KMEMCHECK_DISABLED_BY_DEFAULT
  31. bool "disabled"
  32. depends on KMEMCHECK
  33. config KMEMCHECK_ENABLED_BY_DEFAULT
  34. bool "enabled"
  35. depends on KMEMCHECK
  36. config KMEMCHECK_ONESHOT_BY_DEFAULT
  37. bool "one-shot"
  38. depends on KMEMCHECK
  39. help
  40. In one-shot mode, only the first error detected is reported before
  41. kmemcheck is disabled.
  42. endchoice
  43. config KMEMCHECK_QUEUE_SIZE
  44. int "kmemcheck: error queue size"
  45. depends on KMEMCHECK
  46. default 64
  47. help
  48. Select the maximum number of errors to store in the queue. Since
  49. errors can occur virtually anywhere and in any context, we need a
  50. temporary storage area which is guarantueed not to generate any
  51. other faults. The queue will be emptied as soon as a tasklet may
  52. be scheduled. If the queue is full, new error reports will be
  53. lost.
  54. config KMEMCHECK_SHADOW_COPY_SHIFT
  55. int "kmemcheck: shadow copy size (5 => 32 bytes, 6 => 64 bytes)"
  56. depends on KMEMCHECK
  57. range 2 8
  58. default 5
  59. help
  60. Select the number of shadow bytes to save along with each entry of
  61. the queue. These bytes indicate what parts of an allocation are
  62. initialized, uninitialized, etc. and will be displayed when an
  63. error is detected to help the debugging of a particular problem.
  64. config KMEMCHECK_PARTIAL_OK
  65. bool "kmemcheck: allow partially uninitialized memory"
  66. depends on KMEMCHECK
  67. default y
  68. help
  69. This option works around certain GCC optimizations that produce
  70. 32-bit reads from 16-bit variables where the upper 16 bits are
  71. thrown away afterwards. This may of course also hide some real
  72. bugs.
  73. config KMEMCHECK_BITOPS_OK
  74. bool "kmemcheck: allow bit-field manipulation"
  75. depends on KMEMCHECK
  76. default n
  77. help
  78. This option silences warnings that would be generated for bit-field
  79. accesses where not all the bits are initialized at the same time.
  80. This may also hide some real bugs.
  81. endif