All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Wang <patrick.wang.shcn@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, yee.lee@mediatek.com
Subject: Re: [PATCH v3 3/3] mm: kmemleak: check physical address when scan
Date: Sat, 11 Jun 2022 11:46:27 +0800	[thread overview]
Message-ID: <957f5626-2c89-f53a-2156-bbde2bb545f2@gmail.com> (raw)
In-Reply-To: <YqI44Q20oJNVl+QV@arm.com>



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

  reply	other threads:[~2022-06-11  3:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 12:49 [PATCH v3 0/3] mm: kmemleak: store objects allocated with physical address separately and check when scan Patrick Wang
2022-06-09 12:49 ` [PATCH v3 1/3] mm: kmemleak: add OBJECT_PHYS flag for objects allocated with physical address Patrick Wang
2022-06-09 18:06   ` Catalin Marinas
2022-06-09 12:49 ` [PATCH v3 2/3] mm: kmemleak: add rbtree and store physical address for objects allocated with PA Patrick Wang
2022-06-09 18:10   ` Catalin Marinas
2022-06-09 12:49 ` [PATCH v3 3/3] mm: kmemleak: check physical address when scan Patrick Wang
2022-06-09 18:16   ` Catalin Marinas
2022-06-11  3:46     ` Patrick Wang [this message]
2022-06-11  9:46       ` Catalin Marinas

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=957f5626-2c89-f53a-2156-bbde2bb545f2@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 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.