On Wed, 29 Sept 2021 at 14:42, Marco Elver <elver@xxxxxxxxxx> wrote: > > On Wed, Sep 29, 2021 at 07:49PM -0400, yanjun.zhu@xxxxxxxxx wrote: > > From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > > > > Since the function __kasan_kmalloc is only used in kasan module, > > remove EXPORT_SYMBOL to this function. > > This is incorrect, see below. > > > @@ -521,7 +521,6 @@ void * __must_check __kasan_kmalloc(struct kmem_cache *cache, const void *object > > { > > return ____kasan_kmalloc(cache, object, size, flags); > > } > > -EXPORT_SYMBOL(__kasan_kmalloc); > > Sorry, but this will break all users of kmalloc() with KASAN on if > !TRACING: *module users. An allmodconfig but with CONFIG_TRACING=n will probably show you the problem. > __always_inline kmalloc() include/linux/slab.h > -> __always_inline kmem_cache_alloc_trace() include/linux/slab.h > -> __always_inline kasan_kmalloc() include/linux/kasan.h > -> __kasan_kmalloc() mm/kasan/common.c