Skip to contentSkip to conversation

kmemcheck updates for -tip

GIT PULL Vegard Nossum 4 participants 5 messages Feb 22, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

Here are the latest kmemcheck developments. Changes are basically:

1. Bitfield annotations.
2. Fix REP handling on P4s.
3. Page allocator hooks.

At boot, I get two false positives, in copy_mount_options() and __dequeue_signal(). I've also seen two spontaneous floods of warnings from somewhere in aio code, but I couldn't pinpoint exactly why things went wrong. I guess it will need a bit more research.

Vegard

The following changes since commit 2215d76c949375d38b33f32580908accfffbb461:
Ingo Molnar (1):
Merge branch 'x86/core' into kmemcheck

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck.git for-tip

Vegard Nossum (12):
kmemcheck: bitfield API
net: use kmemcheck bitfields API for skbuff
net: annotate bitfields in struct inet_sock
ieee1394: annotate bitfield ieee1394/csr1212: fix false positive kmemcheck report
kmemcheck: annotate inet_timewait_sock bitfields
kmemcheck: disable fast string operations on P4 CPUs
kmemcheck: rip out REP instruction emulation
kmemcheck: add hooks for page- and sg-dma-mappings
kmemcheck: don't track allocated page tables
kmemcheck: add hooks for the page allocator
kmemcheck: depend on !SLUB_DEBUG_ON

 arch/x86/Kconfig.debug             |    2 +-
 arch/x86/include/asm/dma-mapping.h |    6 ++
 arch/x86/include/asm/thread_info.h |    4 +-
 arch/x86/kernel/cpu/intel.c        |   23 +++++++
 arch/x86/mm/kmemcheck/kmemcheck.c  |  121 +-----------------------------------
 arch/x86/mm/kmemcheck/opcode.c     |   13 +----
 arch/x86/mm/kmemcheck/opcode.h     |    3 +-
 arch/x86/mm/kmemcheck/shadow.c     |    8 +++
 arch/x86/mm/pgtable.c              |   12 ++--
 drivers/ieee1394/csr1212.c         |    2 +
 drivers/ieee1394/nodemgr.c         |    7 ++-
 include/linux/gfp.h                |    5 ++
 include/linux/kmemcheck.h          |   72 ++++++++++++++++++++--
 include/linux/skbuff.h             |   33 ++++++----
 include/net/inet_sock.h            |   26 +++++---
 include/net/inet_timewait_sock.h   |   11 ++-
 mm/kmemcheck.c                     |   45 ++++++++++----
 mm/page_alloc.c                    |    8 +++
 mm/slab.c                          |   15 +++--
 mm/slub.c                          |   23 +++++--
 net/core/skbuff.c                  |    8 +++
 net/ipv4/inet_timewait_sock.c      |    3 +
 22 files changed, 252 insertions(+), 198 deletions(-)
#1 lore raw
Quoted 54 lines · Vegard Nossum

Hi,

Here are the latest kmemcheck developments. Changes are basically:

1. Bitfield annotations.
2. Fix REP handling on P4s.
3. Page allocator hooks.

At boot, I get two false positives, in copy_mount_options() and __dequeue_signal(). I've also seen two spontaneous floods of warnings from somewhere in aio code, but I couldn't pinpoint exactly why things went wrong. I guess it will need a bit more research.

Vegard

The following changes since commit 2215d76c949375d38b33f32580908accfffbb461:
Ingo Molnar (1):
Merge branch 'x86/core' into kmemcheck

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck.git for-tip

Vegard Nossum (12):
kmemcheck: bitfield API
net: use kmemcheck bitfields API for skbuff
net: annotate bitfields in struct inet_sock
ieee1394: annotate bitfield ieee1394/csr1212: fix false positive kmemcheck report
kmemcheck: annotate inet_timewait_sock bitfields
kmemcheck: disable fast string operations on P4 CPUs
kmemcheck: rip out REP instruction emulation
kmemcheck: add hooks for page- and sg-dma-mappings
kmemcheck: don't track allocated page tables
kmemcheck: add hooks for the page allocator
kmemcheck: depend on !SLUB_DEBUG_ON

 arch/x86/Kconfig.debug             |    2 +-
 arch/x86/include/asm/dma-mapping.h |    6 ++
 arch/x86/include/asm/thread_info.h |    4 +-
 arch/x86/kernel/cpu/intel.c        |   23 +++++++
 arch/x86/mm/kmemcheck/kmemcheck.c  |  121 +-----------------------------------
 arch/x86/mm/kmemcheck/opcode.c     |   13 +----
 arch/x86/mm/kmemcheck/opcode.h     |    3 +-
 arch/x86/mm/kmemcheck/shadow.c     |    8 +++
 arch/x86/mm/pgtable.c              |   12 ++--
 drivers/ieee1394/csr1212.c         |    2 +
 drivers/ieee1394/nodemgr.c         |    7 ++-
 include/linux/gfp.h                |    5 ++
 include/linux/kmemcheck.h          |   72 ++++++++++++++++++++--
 include/linux/skbuff.h             |   33 ++++++----
 include/net/inet_sock.h            |   26 +++++---
Quoted 8 lines
 include/net/inet_timewait_sock.h   |   11 ++-
 mm/kmemcheck.c                     |   45 ++++++++++----
 mm/page_alloc.c                    |    8 +++
 mm/slab.c                          |   15 +++--
 mm/slub.c                          |   23 +++++--
 net/core/skbuff.c                  |    8 +++
 net/ipv4/inet_timewait_sock.c      |    3 +
 22 files changed, 252 insertions(+), 198 deletions(-)

Pulled into tip:kmemcheck and started testing it, thanks Vegard!

Ingo

#2 lore raw
Quoted 66 lines · Ingo Molnar
Quoted 54 lines · Vegard Nossum

Hi,

Here are the latest kmemcheck developments. Changes are basically:

1. Bitfield annotations.
2. Fix REP handling on P4s.
3. Page allocator hooks.

At boot, I get two false positives, in copy_mount_options() and __dequeue_signal(). I've also seen two spontaneous floods of warnings from somewhere in aio code, but I couldn't pinpoint exactly why things went wrong. I guess it will need a bit more research.

Vegard

The following changes since commit 2215d76c949375d38b33f32580908accfffbb461:
Ingo Molnar (1):
Merge branch 'x86/core' into kmemcheck

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck.git for-tip

Vegard Nossum (12):
kmemcheck: bitfield API
net: use kmemcheck bitfields API for skbuff
net: annotate bitfields in struct inet_sock
ieee1394: annotate bitfield ieee1394/csr1212: fix false positive kmemcheck report
kmemcheck: annotate inet_timewait_sock bitfields
kmemcheck: disable fast string operations on P4 CPUs
kmemcheck: rip out REP instruction emulation
kmemcheck: add hooks for page- and sg-dma-mappings
kmemcheck: don't track allocated page tables
kmemcheck: add hooks for the page allocator
kmemcheck: depend on !SLUB_DEBUG_ON

 arch/x86/Kconfig.debug             |    2 +-
 arch/x86/include/asm/dma-mapping.h |    6 ++
 arch/x86/include/asm/thread_info.h |    4 +-
 arch/x86/kernel/cpu/intel.c        |   23 +++++++
 arch/x86/mm/kmemcheck/kmemcheck.c  |  121 +-----------------------------------
 arch/x86/mm/kmemcheck/opcode.c     |   13 +----
 arch/x86/mm/kmemcheck/opcode.h     |    3 +-
 arch/x86/mm/kmemcheck/shadow.c     |    8 +++
 arch/x86/mm/pgtable.c              |   12 ++--
 drivers/ieee1394/csr1212.c         |    2 +
 drivers/ieee1394/nodemgr.c         |    7 ++-
 include/linux/gfp.h                |    5 ++
 include/linux/kmemcheck.h          |   72 ++++++++++++++++++++--
 include/linux/skbuff.h             |   33 ++++++----
 include/net/inet_sock.h            |   26 +++++---
Quoted 8 lines
 include/net/inet_timewait_sock.h   |   11 ++-
 mm/kmemcheck.c                     |   45 ++++++++++----
 mm/page_alloc.c                    |    8 +++
 mm/slab.c                          |   15 +++--
 mm/slub.c                          |   23 +++++--
 net/core/skbuff.c                  |    8 +++
 net/ipv4/inet_timewait_sock.c      |    3 +
 22 files changed, 252 insertions(+), 198 deletions(-)
Quoted 3 lines

Pulled into tip:kmemcheck and started testing it, thanks Vegard!

Ingo

BTW, I just tested kmemcheck (without these fixes pulled) and encountered some troubles with the function graph tracer which hangs during the self tests. As well as a message from hrtimer which tells its interrupt is too slow.

Well, I'm pulling latest -tip and will see.

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
Quoted 4 lines · Frederic Weisbecker

BTW, I just tested kmemcheck (without these fixes pulled) and encountered some troubles with the function graph tracer which hangs during the self tests. As well as a message from hrtimer which tells its interrupt is too slow.

I had function graph self test issues with kmemcheck in -tip yesterday too (without kmemcheck the the function call graph finished quickly). I left it going a full 10 minutes before concluding my machine was too slow... Perhaps there is more to it? : )

Signature · 1 line
Sitsofe | http://sucs.org/~sits/
#4 lore raw
In reply to Frederic Weisbecker

2009/2/22 Frederic Weisbecker <[email protected]>:

Quoted 5 lines

BTW, I just tested kmemcheck (without these fixes pulled) and encountered some troubles with the function graph tracer which hangs during the self tests. As well as a message from hrtimer which tells its interrupt is too slow.

Well, I'm pulling latest -tip and will see.

Hm, yes. kmemcheck doesn't work well with ftrace -- you'd have to disable tracing (i.e. removing the -pg option to gcc) for at least the x86 page fault handler and the kmemcheck code. I had a patch to fix this a while ago, but it's not very nice to exclude page faults from ftrace.

I should make it depend on !FTRACE for now to prevent more head-scratching from others. Thanks for testing!

Vegard

Signature · 4 lines
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036