lkml.org 
[lkml]   [2022]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 3/3] mm: kmemleak: check physical address when scan
From


On 2022/6/10 02:16, Catalin Marinas wrote:
> On Thu, Jun 09, 2022 at 08:49:50PM +0800, Patrick Wang wrote:
>> Check the physical address of objects for its boundary
>> when scan instead of in kmemleak_*_phys().
>>
>> Fixes: 23c2d497de21 ("mm: kmemleak: take a full lowmem check in kmemleak_*_phys()")
>> Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
>> Signed-off-by: Patrick Wang <patrick.wang.shcn@gmail.com>
>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
>
> The fixed commit above was cc stable, so we'll probably need all these
> three patches in stable. But I'd keep them a bit in -next for testing
> first (and I see Andrew already picked them up; we might as well merge
> them in 5.20 and send them to -stable after, it's not some critical
> feature).
>
> Thanks for the series. I don't think you need to respin unless others of
> comments.

I've received an auto build test WARNING from kernel test robot:

mm/kmemleak.c: In function 'scan_object':
>> arch/powerpc/include/asm/page.h:215:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
215 | #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET))
| ^
mm/kmemleak.c:1403:19: note: in expansion of macro '__va'
1403 | __va((void *)object->pointer) :
| ^~~~

So I will replace __va((void *)object->pointer)
to __va((phys_addr_t)object->pointer) for fixing this warning,
and move the prototype change and the kmemleak_not_leak_phys()
removal to a separate one as you suggested at the same time.

Thanks for these comments and suggestions.

Thanks,
Patrick

\
 
 \ /
  Last update: 2022-06-11 05:47    [W:0.052 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site