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>] [day] [month] [year] [list]
Message-Id: <20241022184142.5691-1-kyle.meyer@hpe.com>
Date: Tue, 22 Oct 2024 13:41:42 -0500
From: Kyle Meyer <kyle.meyer@....com>
To: akpm@...ux-foundation.org, rppt@...nel.org, david@...hat.com,
        dan.j.williams@...el.com, Jonathan.Cameron@...wei.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Kyle Meyer <kyle.meyer@....com>
Subject: [PATCH] mm: numa_memblks: Don't skip reserved areas before DRAM

memblock_start_of_DRAM() returns the base address of the 1st usable
memory region. Reserved memory regions can start before that address.

Instead of skipping the truncated portions of NUMA memory blocks that
start before DRAM, add them to 'numa_reserved_meminfo'. Without this
patch, reserved areas present in the SRAT before the start of DRAM are
not assigned a node ID.

Fixes: f7feea289f9a ("mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizing meminfo")
Signed-off-by: Kyle Meyer <kyle.meyer@....com>
---
 mm/numa_memblks.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/mm/numa_memblks.c b/mm/numa_memblks.c
index be52b93a9c58..384397d39d6d 100644
--- a/mm/numa_memblks.c
+++ b/mm/numa_memblks.c
@@ -227,10 +227,14 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi)
 			continue;
 		}
 
-		/* make sure all non-reserved blocks are inside the limits */
-		bi->start = max(bi->start, low);
+		/* preserve info for reserved areas before DRAM */
+		if (bi->start < low) {
+			numa_add_memblk_to(bi->nid, bi->start, low,
+					   &numa_reserved_meminfo);
+			bi->start = low;
+		}
 
-		/* preserve info for non-RAM areas above 'max_pfn': */
+		/* preserve info for reserved areas after DRAM */
 		if (bi->end > high) {
 			numa_add_memblk_to(bi->nid, high, bi->end,
 					   &numa_reserved_meminfo);
-- 
2.35.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ