lkml.org 
[lkml]   [2022]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 3/4] mm: kmemleak: add rbtree and store physical address for objects allocated with PA
From


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

\
 
 \ /
  Last update: 2022-06-25 08:39    [W:0.427 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site