Thread (65 messages) 65 messages, 7 authors, 2014-07-15

[RFC/PATCH RESEND -next 12/21] mm: util: move krealloc/kzfree to slab_common.c

From: Andrey Ryabinin <hidden>
Date: 2014-07-10 07:48:44
Also in: linux-kbuild, linux-mm, lkml

On 07/09/14 18:32, Christoph Lameter wrote:
On Wed, 9 Jul 2014, Andrey Ryabinin wrote:
quoted
To avoid false positive reports in kernel address sanitizer krealloc/kzfree
functions shouldn't be instrumented. Since we want to instrument other
functions in mm/util.c, krealloc/kzfree moved to slab_common.c which is not
instrumented.

Unfortunately we can't completely disable instrumentation for one function.
We could disable compiler's instrumentation for one function by using
__atribute__((no_sanitize_address)).
But the problem here is that memset call will be replaced by instumented
version kasan_memset since currently it's implemented as define:
Looks good to me and useful regardless of the sanitizer going in.

Acked-by: Christoph Lameter <redacted>
I also noticed in mm/util.c:

	/* Tracepoints definitions. */
	EXPORT_TRACEPOINT_SYMBOL(kmalloc);
	EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc);
	EXPORT_TRACEPOINT_SYMBOL(kmalloc_node);
	EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc_node);
	EXPORT_TRACEPOINT_SYMBOL(kfree);
	EXPORT_TRACEPOINT_SYMBOL(kmem_cache_free);

Should I send another patch to move this to slab_common.c?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help