From: Patrick Wang <patrick.wang.shcn@gmail.com>
To: Yee Lee <yee.lee@mediatek.com>,
catalin.marinas@arm.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/4] mm: kmemleak: add rbtree and store physical address for objects allocated with PA
Date: Sat, 25 Jun 2022 14:38:29 +0800 [thread overview]
Message-ID: <50b253d5-7719-ac79-d72a-a28b83af1049@gmail.com> (raw)
In-Reply-To: <10660122efb538669144e4c46558b83400125d79.camel@mediatek.com>
On 2022/6/23 19:25, 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
Hi Yee,
Thanks for your information. Similar situation appears in
percpu.c (address allocated with memblock, object freed with
kmemleak_free(), if I didn't miss others). Kmemleak_ignore_phys()
could replace kmemleak_free() for physical objects like Catalin said.
And adding kmemleak_free_phys() might not be essential, because
there are few places that meet the above situation.
Thanks,
Patrick
next prev parent reply other threads:[~2022-06-25 6:38 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
2022-06-25 6:38 ` Patrick Wang [this message]
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=50b253d5-7719-ac79-d72a-a28b83af1049@gmail.com \
--to=patrick.wang.shcn@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).