lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250717085723.1875462-1-mawupeng1@huawei.com>
Date: Thu, 17 Jul 2025 16:57:23 +0800
From: Wupeng Ma <mawupeng1@...wei.com>
To: <akpm@...ux-foundation.org>, <rppt@...nel.org>, <ardb@...nel.org>
CC: <mawupeng1@...wei.com>, <linux-mm@...ck.org>,
	<linux-kernel@...r.kernel.org>
Subject: [PATCH] mm: ignore nomap memory during mirror init

When memory mirroring is enabled, the BIOS may reserve memory regions
at the start of the physical address space without the MR flag. This will
lead to zone_movable_pfn to be updated to the start of these reserved
regions, resulting in subsequent mirrored memory being ignored.

Here is the log with efi=debug enabled:
  efi:   0x084004000000-0x0842bf37ffff [Conventional|   |  |MR|...|WB|WT|WC|  ]
  efi:   0x0842bf380000-0x0842c21effff [Loader Code |   |  |MR|...|WB|WT|WC|  ]
  efi:   0x0842c21f0000-0x0847ffffffff [Conventional|   |  |MR|...|WB|WT|WC|  ]
  efi:   0x085000000000-0x085fffffffff [Conventional|   |  |  |...|WB|WT|WC|  ]
...
  efi:   0x084000000000-0x084003ffffff [Reserved    |   |  |  |...|WB|WT|WC|  ]

Since this kind of memory can not be used by kernel. ignore nomap memory to fix
this issue.

Signed-off-by: Wupeng Ma <mawupeng1@...wei.com>
---
 mm/mm_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index f2944748f526..1c36518f0fe4 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -405,7 +405,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)
 		}
 
 		for_each_mem_region(r) {
-			if (memblock_is_mirror(r))
+			if (memblock_is_mirror(r) || memblock_is_nomap(r))
 				continue;
 
 			nid = memblock_get_region_node(r);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ