From: Catalin Marinas <catalin.marinas@arm.com>
To: Yee Lee <yee.lee@mediatek.com>
Cc: Patrick Wang <patrick.wang.shcn@gmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Marco Elver <elver@google.com>
Subject: Re: [PATCH v4 3/4] mm: kmemleak: add rbtree and store physical address for objects allocated with PA
Date: Fri, 24 Jun 2022 11:18:43 +0100 [thread overview]
Message-ID: <YrWPg3xIHbm9bFxP@arm.com> (raw)
In-Reply-To: <10660122efb538669144e4c46558b83400125d79.camel@mediatek.com>
On Thu, Jun 23, 2022 at 07:25:15PM +0800, Yee Lee wrote:
> On Thu, 2022-06-23 at 16:45 +0800, Yee Lee wrote:
> > Now we have seperated rb_tree for phys and virts addresses. But why
> > can't we have kmemleak_free_phys()? It may apply the same format to
> > delete_object_full().
> >
> > Some users would request to remove the kmemleak object from the phys
> > tree but we don't have this one.
>
> Please check this, an issue happened at kfence with the latest kmemleak
> patches. kfence pool allocated memory from memblock but have no way to
> free it from the phys tree.
> https://lkml.org/lkml/2022/6/23/486
I don't think I was cc'ed on the other thread but at a quick look, what
you probably want is:
kmemleak_ignore_phys(__kfence_pool);
instead of the current kmemleak_free(). With Patrick's changes, you can
no longer tell kmemleak about an object with a physical address and free
it with the virtual one.
--
Catalin
next prev parent reply other threads:[~2022-06-24 10:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-11 3:55 [PATCH v4 0/4] mm: kmemleak: store objects allocated with physical address separately and check when scan Patrick Wang
2022-06-11 3:55 ` [PATCH v4 1/4] mm: kmemleak: remove kmemleak_not_leak_phys() and the min_count argument to kmemleak_alloc_phys() Patrick Wang
2022-06-11 9:47 ` Catalin Marinas
2022-06-11 3:55 ` [PATCH v4 2/4] mm: kmemleak: add OBJECT_PHYS flag for objects allocated with physical address Patrick Wang
2022-06-11 3:55 ` [PATCH v4 3/4] mm: kmemleak: add rbtree and store physical address for objects allocated with PA Patrick Wang
2022-06-23 8:45 ` Yee Lee
2022-06-23 11:25 ` Yee Lee
2022-06-24 10:18 ` Catalin Marinas [this message]
2022-06-25 6:38 ` Patrick Wang
2022-06-11 3:55 ` [PATCH v4 4/4] mm: kmemleak: check physical address when scan Patrick Wang
2022-07-12 13:43 ` [PATCH v4 0/4] mm: kmemleak: store objects allocated with physical address separately and check " Geert Uytterhoeven
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=YrWPg3xIHbm9bFxP@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=elver@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=patrick.wang.shcn@gmail.com \
--cc=yee.lee@mediatek.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.