Kconfig.kmemcheck 2.9 KB

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