diff options
| author | Levin, Alexander (Sasha Levin) <alexander.levin@verizon.com> | 2017-11-15 20:36:02 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-15 21:21:05 -0500 |
| commit | 4675ff05de2d76d167336b368bd07f3fef6ed5a6 (patch) | |
| tree | 212d8adf40e13c2a27ac7834d14ca4900923b98c /lib | |
| parent | d8be75663cec0069b85f80191abd2682ce4a512f (diff) | |
kmemcheck: rip it out
Fix up makefiles, remove references, and git rm kmemcheck.
Link: http://lkml.kernel.org/r/20171007030159.22241-4-alexander.levin@verizon.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Vegard Nossum <vegardno@ifi.uio.no>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Tim Hansen <devtimhansen@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 6 | ||||
| -rw-r--r-- | lib/Kconfig.kmemcheck | 94 |
2 files changed, 2 insertions, 98 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 07ce7449765a..5402e3954659 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -504,7 +504,7 @@ config DEBUG_OBJECTS_ENABLE_DEFAULT | |||
| 504 | 504 | ||
| 505 | config DEBUG_SLAB | 505 | config DEBUG_SLAB |
| 506 | bool "Debug slab memory allocations" | 506 | bool "Debug slab memory allocations" |
| 507 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | 507 | depends on DEBUG_KERNEL && SLAB |
| 508 | help | 508 | help |
| 509 | Say Y here to have the kernel do limited verification on memory | 509 | Say Y here to have the kernel do limited verification on memory |
| 510 | allocation as well as poisoning memory on free to catch use of freed | 510 | allocation as well as poisoning memory on free to catch use of freed |
| @@ -516,7 +516,7 @@ config DEBUG_SLAB_LEAK | |||
| 516 | 516 | ||
| 517 | config SLUB_DEBUG_ON | 517 | config SLUB_DEBUG_ON |
| 518 | bool "SLUB debugging on by default" | 518 | bool "SLUB debugging on by default" |
| 519 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | 519 | depends on SLUB && SLUB_DEBUG |
| 520 | default n | 520 | default n |
| 521 | help | 521 | help |
| 522 | Boot with debugging on by default. SLUB boots by default with | 522 | Boot with debugging on by default. SLUB boots by default with |
| @@ -730,8 +730,6 @@ config DEBUG_STACKOVERFLOW | |||
| 730 | 730 | ||
| 731 | If in doubt, say "N". | 731 | If in doubt, say "N". |
| 732 | 732 | ||
| 733 | source "lib/Kconfig.kmemcheck" | ||
| 734 | |||
| 735 | source "lib/Kconfig.kasan" | 733 | source "lib/Kconfig.kasan" |
| 736 | 734 | ||
| 737 | endmenu # "Memory Debugging" | 735 | endmenu # "Memory Debugging" |
diff --git a/lib/Kconfig.kmemcheck b/lib/Kconfig.kmemcheck deleted file mode 100644 index 846e039a86b4..000000000000 --- a/lib/Kconfig.kmemcheck +++ /dev/null | |||
| @@ -1,94 +0,0 @@ | |||
| 1 | config HAVE_ARCH_KMEMCHECK | ||
| 2 | bool | ||
| 3 | |||
| 4 | if HAVE_ARCH_KMEMCHECK | ||
| 5 | |||
| 6 | menuconfig KMEMCHECK | ||
| 7 | bool "kmemcheck: trap use of uninitialized memory" | ||
| 8 | depends on DEBUG_KERNEL | ||
| 9 | depends on !X86_USE_3DNOW | ||
| 10 | depends on SLUB || SLAB | ||
| 11 | depends on !CC_OPTIMIZE_FOR_SIZE | ||
| 12 | depends on !FUNCTION_TRACER | ||
| 13 | select FRAME_POINTER | ||
| 14 | select STACKTRACE | ||
| 15 | default n | ||
| 16 | help | ||
| 17 | This option enables tracing of dynamically allocated kernel memory | ||
| 18 | to see if memory is used before it has been given an initial value. | ||
| 19 | Be aware that this requires half of your memory for bookkeeping and | ||
| 20 | will insert extra code at *every* read and write to tracked memory | ||
| 21 | thus slow down the kernel code (but user code is unaffected). | ||
| 22 | |||
| 23 | The kernel may be started with kmemcheck=0 or kmemcheck=1 to disable | ||
| 24 | or enable kmemcheck at boot-time. If the kernel is started with | ||
| 25 | kmemcheck=0, the large memory and CPU overhead is not incurred. | ||
| 26 | |||
| 27 | choice | ||
| 28 | prompt "kmemcheck: default mode at boot" | ||
| 29 | depends on KMEMCHECK | ||
| 30 | default KMEMCHECK_ONESHOT_BY_DEFAULT | ||
| 31 | help | ||
| 32 | This option controls the default behaviour of kmemcheck when the | ||
| 33 | kernel boots and no kmemcheck= parameter is given. | ||
| 34 | |||
| 35 | config KMEMCHECK_DISABLED_BY_DEFAULT | ||
| 36 | bool "disabled" | ||
| 37 | depends on KMEMCHECK | ||
| 38 | |||
| 39 | config KMEMCHECK_ENABLED_BY_DEFAULT | ||
| 40 | bool "enabled" | ||
| 41 | depends on KMEMCHECK | ||
| 42 | |||
| 43 | config KMEMCHECK_ONESHOT_BY_DEFAULT | ||
| 44 | bool "one-shot" | ||
| 45 | depends on KMEMCHECK | ||
| 46 | help | ||
| 47 | In one-shot mode, only the first error detected is reported before | ||
| 48 | kmemcheck is disabled. | ||
| 49 | |||
| 50 | endchoice | ||
| 51 | |||
| 52 | config KMEMCHECK_QUEUE_SIZE | ||
| 53 | int "kmemcheck: error queue size" | ||
| 54 | depends on KMEMCHECK | ||
| 55 | default 64 | ||
| 56 | help | ||
| 57 | Select the maximum number of errors to store in the queue. Since | ||
| 58 | errors can occur virtually anywhere and in any context, we need a | ||
| 59 | temporary storage area which is guarantueed not to generate any | ||
| 60 | other faults. The queue will be emptied as soon as a tasklet may | ||
| 61 | be scheduled. If the queue is full, new error reports will be | ||
| 62 | lost. | ||
| 63 | |||
| 64 | config KMEMCHECK_SHADOW_COPY_SHIFT | ||
| 65 | int "kmemcheck: shadow copy size (5 => 32 bytes, 6 => 64 bytes)" | ||
| 66 | depends on KMEMCHECK | ||
| 67 | range 2 8 | ||
| 68 | default 5 | ||
| 69 | help | ||
| 70 | Select the number of shadow bytes to save along with each entry of | ||
| 71 | the queue. These bytes indicate what parts of an allocation are | ||
| 72 | initialized, uninitialized, etc. and will be displayed when an | ||
| 73 | error is detected to help the debugging of a particular problem. | ||
| 74 | |||
| 75 | config KMEMCHECK_PARTIAL_OK | ||
| 76 | bool "kmemcheck: allow partially uninitialized memory" | ||
| 77 | depends on KMEMCHECK | ||
| 78 | default y | ||
| 79 | help | ||
| 80 | This option works around certain GCC optimizations that produce | ||
| 81 | 32-bit reads from 16-bit variables where the upper 16 bits are | ||
| 82 | thrown away afterwards. This may of course also hide some real | ||
| 83 | bugs. | ||
| 84 | |||
| 85 | config KMEMCHECK_BITOPS_OK | ||
| 86 | bool "kmemcheck: allow bit-field manipulation" | ||
| 87 | depends on KMEMCHECK | ||
| 88 | default n | ||
| 89 | help | ||
| 90 | This option silences warnings that would be generated for bit-field | ||
| 91 | accesses where not all the bits are initialized at the same time. | ||
| 92 | This may also hide some real bugs. | ||
| 93 | |||
| 94 | endif | ||
