From: Qian Cai <quic_qiancai@quicinc.com>
To: Mike Rapoport <rppt@kernel.org>, <linux-mm@kvack.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] memblock: exclude MEMBLOCK_NOMAP regions from kmemleak
Date: Thu, 21 Oct 2021 12:52:01 -0400 [thread overview]
Message-ID: <0599ae1a-e00b-b69c-6ad0-b741ddc291b2@quicinc.com> (raw)
In-Reply-To: <20211021070929.23272-1-rppt@kernel.org>
On 10/21/21 3:09 AM, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> Hi,
>
> This is take 2 to fix interaction between MEMBLOCK_NOMAP and kmemleak.
>
> The previous version caused boot failures Qian Cai reported here:
>
> https://lore.kernel.org/all/c30ff0a2-d196-c50d-22f0-bd50696b1205@quicinc.com
>
> The failures happened because calling kmemleak_free_part_phys() (or any
> kmemleak phys APIs for that matter) too early means it cannot use __va() on
> arm64.
>
> This late in the cycle I can only think of reverting kmemleak wavier from
> memblock_mark_nomap() and putting it in the only two callers that set
> MEMBLOCK_NOMAP to an allocated chunk rather than marking NOMAP "unusable"
> memory reported by firmware.
>
> The first patch here is the revert of v1 and the second patch is actual v2
> implementation.
>
> Vladimir and Qian, I'd appreciate if you could verify that v2 works for
> you.
FYI, this passed the regression tests here.
>
> v2:
> * move kmemleak waiver from memblock_mark_nomap() to callers that need it
> * use kmemleak_ignore_phys() rather than kmemleak_free_part_phys() as
> Catalin suggested.
>
> v1: https://lore.kernel.org/all/20211013054756.12177-1-rppt@kernel.org
>
> Mike Rapoport (2):
> Revert "memblock: exclude NOMAP regions from kmemleak"
> memblock: exclude MEMBLOCK_NOMAP regions from kmemleak
>
> drivers/acpi/tables.c | 3 +++
> drivers/of/of_reserved_mem.c | 2 ++
> mm/memblock.c | 10 ++++------
> 3 files changed, 9 insertions(+), 6 deletions(-)
>
>
> base-commit: 519d81956ee277b4419c723adfb154603c2565ba
>
prev parent reply other threads:[~2021-10-21 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 7:09 Mike Rapoport
2021-10-21 7:09 ` [PATCH v2 1/2] Revert "memblock: exclude NOMAP regions from kmemleak" Mike Rapoport
2021-10-21 8:29 ` Catalin Marinas
2021-10-22 12:22 ` David Hildenbrand
2021-10-21 7:09 ` [PATCH v2 2/2] memblock: exclude MEMBLOCK_NOMAP regions from kmemleak Mike Rapoport
2021-10-21 8:03 ` Vladimir Zapolskiy
2021-10-21 8:32 ` Catalin Marinas
2021-10-22 12:22 ` David Hildenbrand
2021-10-21 16:52 ` Qian Cai [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=0599ae1a-e00b-b69c-6ad0-b741ddc291b2@quicinc.com \
--to=quic_qiancai@quicinc.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
--cc=rppt@linux.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=vladimir.zapolskiy@linaro.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