From: Catalin Marinas <catalin.marinas@arm.com>
To: Qian Cai <cai@lca.pw>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
paulus@ozlabs.org, benh@kernel.crashing.org,
kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/kvm: silence kmemleak false positives
Date: Tue, 12 May 2020 15:17:23 +0100 [thread overview]
Message-ID: <20200512141723.GB14943@gaia> (raw)
In-Reply-To: <44807D44-98D9-431C-9266-08014C4B47F6@lca.pw>
On Mon, May 11, 2020 at 07:43:30AM -0400, Qian Cai wrote:
> On May 11, 2020, at 7:15 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > There is kmemleak_alloc_phys(), which according to the docs can be used
> > for tracking a phys address.
> >
> > Did you try that?
>
> Catalin, feel free to give your thoughts here.
>
> My understanding is that it seems the doc is a bit misleading.
> kmemleak_alloc_phys() is to allocate kmemleak objects for a physical
> address range, so kmemleak could scan those memory pointers within
> for possible referencing other memory. It was only used in memblock so
> far, but those new memory allocations here contain no reference to
> other memory.
>
> In this case, we have already had kmemleak objects for those memory
> allocation. It is just that other pointers reference those memory by
> their physical address which is a known kmemleak limitation won’t be
> able to track the the connection. Thus, we always use
> kmemleak_ignore() to not reporting those as leaks and don’t scan those
> because they do not contain other memory reference.
Indeed. I replied directly to Michael along the same lines.
--
Catalin
next prev parent reply other threads:[~2020-05-12 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 1:55 [PATCH] powerpc/kvm: silence kmemleak false positives Qian Cai
2020-05-11 11:15 ` Michael Ellerman
2020-05-11 11:28 ` Catalin Marinas
2020-05-13 4:00 ` Michael Ellerman
2020-05-11 11:43 ` Qian Cai
2020-05-12 14:17 ` Catalin Marinas [this message]
2020-05-13 4:05 ` Michael Ellerman
2020-05-13 6:24 ` Qian Cai
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=20200512141723.GB14943@gaia \
--to=catalin.marinas@arm.com \
--cc=benh@kernel.crashing.org \
--cc=cai@lca.pw \
--cc=kvm-ppc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@ozlabs.org \
/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