From: Catalin Marinas <catalin.marinas@arm.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Qian Cai <quic_qiancai@quicinc.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] memblock: exclude MEMBLOCK_NOMAP regions from kmemleak
Date: Thu, 21 Oct 2021 09:32:15 +0100 [thread overview]
Message-ID: <YXElj+W48PUf2kIY@arm.com> (raw)
In-Reply-To: <20211021070929.23272-3-rppt@kernel.org>
On Thu, Oct 21, 2021 at 10:09:29AM +0300, Mike Rapoport wrote:
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index f9383736fa0f..71419eb16e09 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -21,6 +21,7 @@
> #include <linux/earlycpio.h>
> #include <linux/initrd.h>
> #include <linux/security.h>
> +#include <linux/kmemleak.h>
> #include "internal.h"
>
> #ifdef CONFIG_ACPI_CUSTOM_DSDT
> @@ -601,6 +602,8 @@ void __init acpi_table_upgrade(void)
> */
> arch_reserve_mem_area(acpi_tables_addr, all_tables_size);
>
> + kmemleak_ignore_phys(acpi_tables_addr);
> +
> /*
> * early_ioremap only can remap 256k one time. If we map all
> * tables one time, we will hit the limit. Need to map chunks
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 59c1390cdf42..9da8835ba5a5 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -21,6 +21,7 @@
> #include <linux/sort.h>
> #include <linux/slab.h>
> #include <linux/memblock.h>
> +#include <linux/kmemleak.h>
>
> #include "of_private.h"
>
> @@ -46,6 +47,7 @@ static int __init early_init_dt_alloc_reserved_memory_arch(phys_addr_t size,
> err = memblock_mark_nomap(base, size);
> if (err)
> memblock_free(base, size);
> + kmemleak_ignore_phys(base);
> }
>
> return err;
More of a nitpick as there's no kmemleak scanning to race with during
early boot: I'd normally call kmemleak_ignore_phys() before marking it
nomap. Either way:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
next prev parent reply other threads:[~2021-10-21 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 7:09 [PATCH v2 0/2] " 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 [this message]
2021-10-22 12:22 ` David Hildenbrand
2021-10-21 16:52 ` [PATCH v2 0/2] " 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=YXElj+W48PUf2kIY@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=quic_qiancai@quicinc.com \
--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