[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.00.0809022209100.15543@abydos.NerdBox.Net>
Date: Tue, 2 Sep 2008 22:25:21 -0700 (PDT)
From: Steve VanDeBogart <vandebo-lkml@...dBox.Net>
To: Pekka Enberg <penberg@...helsinki.fi>
cc: jiayingz@...gle.com, linux-kernel@...r.kernel.org,
user-mode-linux-devel@...ts.sourceforge.net, dkegel@...gle.com
Subject: Re: [uml-devel] [PATCH 4/6] VM: Annotate pagealloc
On Sat, 30 Aug 2008, Pekka Enberg wrote:
> Hi Steve,
>
> On Sat, Aug 30, 2008 at 2:16 AM, Steve VanDeBogart
> <vandebo-lkml@...dbox.net> wrote:
>> Valgrind annotations for valgrind: memory is addressable once it's been
>> alloced, and unaddressable when it is freed again. Can't use malloc-like
>> and free-like because valgrind considers a malloc-like chunk indivisible.
>>
>> Signed-off-by: Steve VanDeBogart <vandebo-lkml@...dbox.net>
>> ---
>>
>> Index: linux-2.6.27-rc5/mm/page_alloc.c
>> @@ -1080,6 +1081,7 @@
>> if (!page)
>> goto failed;
>> }
>> + VALGRIND_MAKE_MEM_UNDEFINED(page_address(page), PAGE_SIZE << order);
>
> No SHOUTING macros please, and I think you should just pass page and
> order here and do the calculation elsewhere.
Valgrind provides a header file that defines these annotation functions.
For the ease of tracking changes to this header file, I've made minimal
changes to it (just a couple lines to integrate with Kconfig). If the
interfaces and/or style is objectionable to the kernel community at
large, than we will have to decide to either wrap the interface that
Valgrind provides or modify the header and track changes manually.
--
Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists