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:45:19 +0200 [thread overview]
Message-ID: <CANpmjNMKCmEHUnKz5rdUkd1HSuLj_S_vaMu+Hr7MuB79ghMERA@mail.gmail.com> (raw)
In-Reply-To: <YVRfQDK0bZwJdmik@elver.google.com>
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.
> __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
next prev parent reply other threads:[~2021-09-29 12:45 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
2021-09-29 12:45 ` Marco Elver [this message]
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=CANpmjNMKCmEHUnKz5rdUkd1HSuLj_S_vaMu+Hr7MuB79ghMERA@mail.gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox