From: Isaac Manjarres <isaacmanjarres@google.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Saravana Kannan <saravanak@google.com>,
Suren Baghdasaryan <surenb@google.com>,
kernel-team@android.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Mike Rapoport <rppt@kernel.org>
Subject: Re: [PATCH v1 0/2] Fixes for kmemleak tracking with CMA regions
Date: Thu, 26 Jan 2023 18:39:53 -0800 [thread overview]
Message-ID: <Y9M5eYzJcFbwlC9g@google.com> (raw)
In-Reply-To: <Y9Eb2k3COoUXJ0CB@arm.com>
On Wed, Jan 25, 2023 at 12:08:58PM +0000, Catalin Marinas wrote:
> That's an option. If there's too much churn to add a flag, an
> alternative is to use the bottom bit of 'end' to set the noleaktrace
> flag.
Using the least significant bit won't work; there are allocations for
CMA regions that can be specified to occur within the first 4 GB of
memory, and would have an alloc-ranges of [0 0xffff_ffff]. I also don't
think there's anything in the memblock documentation that ensures that
those bits are supposed to be clear all the time.
> Yet another idea is to avoid the kmemleak callback on all the 'phys'
> memblock allocations. We can add the callback to the higher level
> memblock_alloc() which returns a VA but the lower level 'phys' variants
> could simply avoid it. However, I think we still need the
> MEMBLOCK_ALLOC_NOLEAKTRACE flag for the kasan shadow allocation. Well,
> given that this flag is not widely used, we can add explicit
> kmemleak_ignore() calls in those four places.
>
> I think the latter, if it works, would be the least intrusive.
I agree; I think using kmemleak_ignore() would be best. I will
split that into series: 1 series that fixes the kmemleak issue
with CMA regions by reverting Calvin's patch and adding a call
to kmemleak_ignore in the call-stack I referenced earlier, and
then another series that cleans up the usage of the flag.
--Isaac
prev parent reply other threads:[~2023-01-27 2:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 22:16 Isaac J. Manjarres
2023-01-09 22:16 ` [PATCH v1 1/2] mm/cma.c: Make kmemleak aware of all " Isaac J. Manjarres
2023-01-09 22:16 ` [PATCH v1 2/2] mm/cma.c: Delete kmemleak objects when freeing CMA areas to buddy at boot Isaac J. Manjarres
2023-01-18 17:16 ` [PATCH v1 0/2] Fixes for kmemleak tracking with CMA regions Catalin Marinas
2023-01-20 0:20 ` Isaac Manjarres
2023-01-24 15:48 ` Catalin Marinas
2023-01-24 20:20 ` Andrew Morton
2023-01-24 21:23 ` Isaac Manjarres
2023-01-24 21:19 ` Isaac Manjarres
2023-01-25 12:08 ` Catalin Marinas
2023-01-27 2:39 ` Isaac Manjarres [this message]
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=Y9M5eYzJcFbwlC9g@google.com \
--to=isaacmanjarres@google.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
--cc=saravanak@google.com \
--cc=surenb@google.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