Skip to content

memblock: exclude MEMBLOCK_NOMAP regions from kmemleak

Mike Rapoport linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesIn review
  2. v11 patch 16 repliesSuperseded

Changes in v2 from the cover letter

* 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "memblock: exclude NOMAP regions from kmemleak"mm/memblock.c+1 -62 replies
2/2memblock: exclude MEMBLOCK_NOMAP regions from kmemleakdrivers/acpi/tables.c drivers/of/of_reserved_mem.c mm/memblock.c+8 -03 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchVladimir ZapolskiyCatalin MarinasDavid Hildenbrand
1/2A-b R-b
2/2T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] memblock: exclude MEMBLOCK_NOMAP regions from kmemleak

From: Mike Rapoport <[email protected]>

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/[email protected]

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.

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/[email protected]

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

Signature · 1 line
2.28.0