Hi Steve,

On Wed, Sep 3, 2008 at 8:08 AM, Steve VanDeBogart
<[EMAIL PROTECTED]> wrote:
> Thank you for pointing out the location of the kmemcheck code.  I looked
> around briefly but didn't find the latest version.  It does seem that
> kmemcheck and Valgrind annotations want to live in the same places so it
> makes perfect sense to combine them where possible.  I'm not exactly sure
> what you find so ugly about the Valgrind annotations, please elaborate.

Upper case macros and littering #ifdefs in the code. See the kmemcheck
hooks how to do it in a clean way.

On Wed, Sep 3, 2008 at 8:08 AM, Steve VanDeBogart
<[EMAIL PROTECTED]> wrote:
> It is true that code above the allocator should not be touching free'd
> slab objects.  However, it is also true that objects from slabs that
> have a constructor should retain their per byte un/initialized state
> through allocation and free cycles (just the semantic of slabs with
> constructors AFAICT).

Sorry for being unclear, sure, object should be marked as initialized
when they're returned from kmem_cache_alloc(). However, what I
disagree with is *where* you're marking them as initialized. Surely
they're not semantically initialized when the slabs are allocated
(although technically they are).

On Wed, Sep 3, 2008 at 8:08 AM, Steve VanDeBogart
<[EMAIL PROTECTED]> wrote:
> Ideally, we'd tell Valgrind that the bytes of a free'd slab object are
> no longer accessible, but the initialized state should remain the same
> until the object is made accessible again by the next allocation of
> the object.  Unfortunately, the compression method for A & V bits in
> Valgrind doesn't allow a region to be inaccessible and retain validness
> bits.

I don't see why you should mark them initialized all the time. Just
mark them as uninitialized on kmem_cache_free() and again as
initialized when they're about to be returned from kmem_cache_alloc()
like we do in kmemcheck.

                              Pekka

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to