All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Elver <elver@google.com>
To: yanjun.zhu@linux.dev
Cc: ryabinin.a.a@gmail.com, akpm@linux-foundation.org,
	kasan-dev@googlegroups.com, linux-mm@kvack.org
Subject: Re: [PATCH 1/1] mm/kasan: avoid export __kasan_kmalloc
Date: Wed, 29 Sep 2021 14:42:40 +0200	[thread overview]
Message-ID: <YVRfQDK0bZwJdmik@elver.google.com> (raw)
In-Reply-To: <20210929234929.857611-1-yanjun.zhu@linux.dev>

On Wed, Sep 29, 2021 at 07:49PM -0400, yanjun.zhu@linux.dev wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> 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:

	__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


       reply	other threads:[~2021-09-29 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210929234929.857611-1-yanjun.zhu@linux.dev>
2021-09-29 12:42 ` Marco Elver [this message]
2021-09-29 12:45   ` [PATCH 1/1] mm/kasan: avoid export __kasan_kmalloc Marco Elver
2021-09-30  3:50     ` yanjun.zhu
2021-09-30  6:19       ` Marco Elver
2021-09-30  6:29         ` Zhu Yanjun
2021-09-30 11:13         ` Zhu Yanjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YVRfQDK0bZwJdmik@elver.google.com \
    --to=elver@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=yanjun.zhu@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.