The attached patch to valgrind-3.3.0 is what I am using to run UML (UserModeLinux) for x86 under memcheck on x86, thus checking the memory accesses of a linux kernel.
-rw-rw-r-- 1 jreiser jreiser 8846 2007-12-15 11:36 valgrind-3.3.0.patch.gz -rw-rw-r-- 1 jreiser jreiser 31383 2007-12-15 11:36 valgrind-3.3.0.patch The changes generally are in three areas: Allow clone() to handle more flag cases successfully, and also establishing a new stack pointer in the child even for a fork-like clone(). These changes are somewhat general, although motivated by UML. Allow better coordination with respect to explicit stack switching; UML uses longjmp() for this purpose. Perhaps after more thought this could be done automatically by VEX when translating "load stack pointer from memory." Enable valgrind to stop tracking the child of a clone() immediately, letting the child run natively. This change is somewhat specific to UML and its "skas0" mode of operation. UML has a difficult time dealing with virtualization of the child side of clone(); having the tool "let go" of most children makes it easier. Obviously UML requires changes, too. Although the linux kernel has kmalloc() and kfree() subroutines, the obvious coorespondence to malloc() and free() does not carry all the needed or desired information. The kernel allocators already have some builtin checking, and allocating a "page" can have non-simple implications. There is work in annotating the linux kernel allocators with VALGRIND_MALLOCLIKE_BLOCK, VALGRIND_FREELIKE_BLOCK, VALGRIND_MAKE_MEM_DEFINED, and VALGRIND_MAKE_MEM_UNDEFINED. Details will appear on the uml-devel mailing list. -- John Reiser, [EMAIL PROTECTED]
valgrind-3.3.0.patch.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers