All of lore.kernel.org
 help / color / mirror / Atom feed
From: yanjun.zhu@linux.dev
To: "Marco Elver" <elver@google.com>
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: Thu, 30 Sep 2021 03:50:25 +0000	[thread overview]
Message-ID: <606c859b9df4c8a1019a7fbc3c13afcb@linux.dev> (raw)
In-Reply-To: <CANpmjNMKCmEHUnKz5rdUkd1HSuLj_S_vaMu+Hr7MuB79ghMERA@mail.gmail.com>

September 29, 2021 8:45 PM, "Marco Elver" <elver@google.com> wrote:

> On Wed, 29 Sept 2021 at 14:42, Marco Elver <elver@google.com> wrote:
> 
>> 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:
> 
> *module users.
> 
> An allmodconfig but with CONFIG_TRACING=n will probably show you the problem.

Follow your advice, I changed CONFIG_TRACING=n in .config. Then I run "make -jxx modules".
But CONFIG_TRACING is changed to y. 
So what you mentioned does not appear.

Zhu Yanjun

> 
>> __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-30  3:50 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 ` [PATCH 1/1] mm/kasan: avoid export __kasan_kmalloc Marco Elver
2021-09-29 12:45   ` Marco Elver
2021-09-30  3:50     ` yanjun.zhu [this message]
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=606c859b9df4c8a1019a7fbc3c13afcb@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    /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.