linux/arch/x86/mm
Pekka Enberg 8e019366ba kmemleak: Don't scan uninitialized memory when kmemcheck is enabled
Ingo Molnar reported the following kmemcheck warning when running both
kmemleak and kmemcheck enabled:

  PM: Adding info for No Bus:vcsa7
  WARNING: kmemcheck: Caught 32-bit read from uninitialized memory
  (f6f6e1a4)
  d873f9f600000000c42ae4c1005c87f70000000070665f666978656400000000
   i i i i u u u u i i i i i i i i i i i i i i i i i i i i i u u u
           ^

  Pid: 3091, comm: kmemleak Not tainted (2.6.31-rc7-tip #1303) P4DC6
  EIP: 0060:[<c110301f>] EFLAGS: 00010006 CPU: 0
  EIP is at scan_block+0x3f/0xe0
  EAX: f40bd700 EBX: f40bd780 ECX: f16b46c0 EDX: 00000001
  ESI: f6f6e1a4 EDI: 00000000 EBP: f10f3f4c ESP: c2605fcc
   DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
  CR0: 8005003b CR2: e89a4844 CR3: 30ff1000 CR4: 000006f0
  DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
  DR6: ffff4ff0 DR7: 00000400
   [<c110313c>] scan_object+0x7c/0xf0
   [<c1103389>] kmemleak_scan+0x1d9/0x400
   [<c1103a3c>] kmemleak_scan_thread+0x4c/0xb0
   [<c10819d4>] kthread+0x74/0x80
   [<c10257db>] kernel_thread_helper+0x7/0x3c
   [<ffffffff>] 0xffffffff
  kmemleak: 515 new suspected memory leaks (see
  /sys/kernel/debug/kmemleak)
  kmemleak: 42 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

The problem here is that kmemleak will scan partially initialized
objects that makes kmemcheck complain. Fix that up by skipping
uninitialized memory regions when kmemcheck is enabled.

Reported-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2009-09-04 16:05:55 +01:00
..
kmemcheck kmemleak: Don't scan uninitialized memory when kmemcheck is enabled 2009-09-04 16:05:55 +01:00
Makefile kmemcheck: add the kmemcheck core 2009-06-13 15:37:30 +02:00
dump_pagetables.c x86: remove (null) in /sys kernel_page_tables 2009-04-14 11:50:22 +02:00
extable.c x86: uaccess: introduce try and catch framework 2009-01-23 17:17:36 -08:00
fault.c x86: Remove spurious printk level from segfault message 2009-07-11 09:56:19 +02:00
gup.c Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-06-20 11:29:32 -07:00
highmem_32.c x86: Export kmap_atomic_prot() needed for TTM. 2009-07-29 15:56:22 +10:00
hugetlbpage.c x86: ignore VM_LOCKED when determining if hugetlb-backed page tables can be shared or not 2009-05-29 08:40:03 -07:00
init.c x86: Declare check_efer() before it gets used 2009-07-01 16:52:54 +02:00
init_32.c Merge commit 'linus/master' into HEAD 2009-06-15 15:50:49 +02:00
init_64.c x86: Fix an incorrect argument of reserve_bootmem() 2009-08-24 20:22:55 +02:00
iomap_32.c Merge commit 'origin/master' into for-linus/xen/master 2009-04-07 13:34:16 -07:00
ioremap.c Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-04-17 09:56:11 -07:00
k8topology_64.c x86: k8 numa register active regions later 2009-01-06 13:21:21 +01:00
kmmio.c Merge branch 'linus' into tracing/core 2009-05-07 11:17:34 +02:00
memtest.c x86: memtest: use pointers of equal type for comparison 2009-06-11 16:26:35 +02:00
mmap.c x86: update copyrights 2009-01-31 04:21:18 +01:00
mmio-mod.c tracing: x86, mmiotrace: only register for die notifier when tracer active 2009-04-29 11:33:34 +02:00
numa.c cpumask: convert node_to_cpumask_map[] to cpumask_var_t 2009-03-13 14:35:31 +01:00
numa_32.c x86: mm/numa_32.c calculate_numa_remap_pages should use __init 2009-04-17 22:43:13 +02:00
numa_64.c x86, mm: Fix node_possible_map logic 2009-05-18 09:21:04 +02:00
pageattr-test.c x86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious 2008-09-05 17:09:57 +02:00
pageattr.c x86: Fix CPA memtype reserving in the set_pages_array*() cases 2009-08-03 19:36:09 +02:00
pat.c x86, pat: Allow ISA memory range uncacheable mapping requests 2009-08-17 14:12:44 -07:00
pf_in.c x86: fix mmiotrace 8-bit register decoding 2008-10-14 10:33:50 +02:00
pf_in.h
pgtable.c x86, 32-bit: Fix double accounting in reserve_top_address() 2009-08-04 16:27:29 +02:00
pgtable_32.c x86/32: no need to use set_pte_present in set_pte_vaddr 2009-03-19 14:04:18 +01:00
srat_32.c x86: Fix a typo in a printk message 2009-05-06 12:23:12 +02:00
srat_64.c x86-64: Fix bad_srat() to clear all state 2009-07-21 15:20:01 -07:00
testmmiotrace.c x86: add far read test to testmmiotrace 2009-03-02 10:20:35 +01:00
tlb.c x86: don't call '->send_IPI_mask()' with an empty mask 2009-08-21 09:48:10 -07:00