1 Jan 2008 03:00
Re: running UserModeLinux under Valgrind(memcheck)
Jeff Dike <jdike <at> addtoit.com>
2008-01-01 02:00:09 GMT
2008-01-01 02:00:09 GMT
On Thu, Dec 27, 2007 at 10:38:21AM -0800, John Reiser wrote: > Patches have been developed which enable UserModeLinux for i686 to > run under the memcheck tool of Valgrind on i686. Thus it is possible > to check dynamically the memory accesses made by a running Linux kernel > against memcheck's model of allowed behavior. This work was supported > by Google Inc. > > The goods: Nice! Did you find anything needing fixing besides the ubd and random drivers reading uninitialized stuff and the random bytes that UML uses to communicate with itself being uninitialized? I did a quick scan of the UML patch, and didn't see any unexpected fixes there. > On the UML side, there is a significant technical issue: the semantics > of kmalloc+kfree do not match the semantics of malloc+free. The kernel > slab allocator caches and re-issues identified objects, which accumulate > state and retain it throughout execution, including from kfree to kmalloc. > In contrast, a region that is passed to free() loses both its contents > and its identity. Also, size is an important parameter to malloc, > but is implicit to kmalloc. The initial patches finesse these issues > (for instance: by supplying the size as trailing parameter to kmalloc, > and by noticing that SLAB_POISON ==> free()), but there will be > significant discussion and work in resolving the differences. Any problem with supporting these sorts of allocation models in(Continue reading)
RSS Feed