Re: [ANNOUNCE] kmemcheck v7

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bart Van Assche <bart.vanassche@...>
Cc: John Reiser <jreiser@...>, Pekka Enberg <penberg@...>, Linux Kernel Mailing List <linux-kernel@...>, Ingo Molnar <mingo@...>, Peter Zijlstra <a.p.zijlstra@...>, Paul E. McKenney <paulmck@...>, Christoph Lameter <clameter@...>, Daniel Walker <dwalker@...>, Andi Kleen <andi@...>, Randy Dunlap <randy.dunlap@...>, Josh Aune <luken@...>, Pekka Paalanen <pq@...>
Date: Saturday, May 10, 2008 - 8:02 am

Hi!

On Sat, May 10, 2008 at 1:04 PM, Bart Van Assche
<bart.vanassche@gmail.com> wrote:

Yes, I have learned of it not so long ago, around January or so. I
wanted to stop kmemcheck development back then, but Ingo and Pekka
convinced me that it could still be useful :-)

(The link is http://bitwagon.com/valgrind+uml/index.html)

I guess the main disadvantages of using kmemcheck over valgrind-memcheck are:
 - kmemcheck can only warn eagerly, whereas memcheck will wait until
the uninitialized bits are actually used. This means that kmemcheck
will report many false positives. (We have some workarounds but this
is obviously not perfect.)
 - kmemcheck can only warn for dynamic memory, whereas kmemcheck I
believe will also work for local variables, static variables, etc.

It would be interesting to compare the output of kmemcheck vs. the
output of memcheck, though.


Thanks. I have actually seen the paper before, but not read all of it.
From a quick glace, it seems that the optimizations described there
apply to the tracking of individual bits within a byte, but since we
are tracking by byte granularity (as opposed to bit granularity), it
also seems irrelevant to kmemcheck. (I am not saying that it isn't
interesting, however.)

Currently, we are using a full byte for each shadowed byte. Since we
actually only use two bits out of eight, we could save three fourths
compared to what we use today.

However, memory usage doesn't seem to be much of a problem. I actually
think it might be worth saving the CPU cycles that are needed for the
lookups/bit operations (memory is cheap, cycles aren't). How is the
speed of Valgrind+UML, does anybody know? Isn't there a problem that
Valgrind will have to emulate all the userspace programs as well?
That, I believe, would make the Valgrinded system painfully slow to
work with. I have no benchmarks or profiler results to refer to, but
kmemcheck at least boots to full userspace+X and is still quite
usable.


Vegard

-- 
"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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE] kmemcheck v7, Vegard Nossum, (Fri Apr 4, 9:44 am)
Re: [ANNOUNCE] kmemcheck v7, Bart Van Assche, (Sat May 10, 5:07 am)
Re: [ANNOUNCE] kmemcheck v7, Pekka Enberg, (Sat May 10, 5:06 am)
Re: [ANNOUNCE] kmemcheck v7, Bart Van Assche, (Sat May 10, 7:04 am)
Re: [ANNOUNCE] kmemcheck v7, Vegard Nossum, (Sat May 10, 8:02 am)
Re: [ANNOUNCE] kmemcheck v7, John Reiser, (Sun May 11, 8:08 am)
Re: [ANNOUNCE] kmemcheck v7, Jeremy Fitzhardinge, (Sat May 10, 1:17 pm)
Re: [ANNOUNCE] kmemcheck v7, Jeff Dike, (Sat May 10, 4:35 pm)
Re: [ANNOUNCE] kmemcheck v7, John Reiser, (Sun May 11, 7:23 am)
Re: [ANNOUNCE] kmemcheck v7, Bart Van Assche, (Sat May 10, 9:29 am)
Re: [ANNOUNCE] kmemcheck v7, Andi Kleen, (Sat May 10, 8:37 am)
Re: [ANNOUNCE] kmemcheck v7, Jeremy Fitzhardinge, (Sat May 10, 1:17 pm)
Re: [ANNOUNCE] kmemcheck v7, Andi Kleen, (Sat May 10, 1:48 pm)
Re: [ANNOUNCE] kmemcheck v7, Jeremy Fitzhardinge, (Sat May 10, 4:45 pm)
Re: [ANNOUNCE] kmemcheck v7, John Reiser, (Sat May 10, 5:29 pm)
Re: [ANNOUNCE] kmemcheck v7, Jeremy Fitzhardinge, (Sat May 10, 7:05 pm)
Re: [ANNOUNCE] kmemcheck v7, Andi Kleen, (Sat May 10, 5:31 pm)
Re: [ANNOUNCE] kmemcheck v7, Jeremy Fitzhardinge, (Sat May 10, 6:59 pm)
Re: [ANNOUNCE] kmemcheck v7, Bart Van Assche, (Sat May 10, 9:22 am)
[PATCH 3/3] slub: add hooks for kmemcheck, Vegard Nossum, (Fri Apr 4, 9:47 am)
[PATCH 2/3] x86: add hooks for kmemcheck, Vegard Nossum, (Fri Apr 4, 9:46 am)
[PATCH 1/3] kmemcheck: add the kmemcheck core, Vegard Nossum, (Fri Apr 4, 9:45 am)