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: <20251228183942.3628918-1-rppt@kernel.org>
Date: Sun, 28 Dec 2025 20:39:42 +0200
From: Mike Rapoport <rppt@...nel.org>
To: linux-mm@...ck.org
Cc: Mike Rapoport <rppt@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] memblock test: include <linux/sizes.h> from tools mm.h stub

From: "Mike Rapoport (Microsoft)" <rppt@...nel.org>

memblock test compilation fails:

memblock.c: In function ‘memblock_validate_numa_coverage’:
memblock.c:784:58: error: ‘SZ_1M’ undeclared (first use in this function)
  784 |                 mem_size_mb = memblock_phys_mem_size() / SZ_1M;
      |                                                          ^~~~~

The SZ_1M is defined in sizes.h, but it is not included by stub version of
mm.h in tools/include/linux.

Add include of sizes.h to tools/include/linux/mm.h to fix the compilation
of memblock tests.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
---
 tools/include/linux/mm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h
index 677c37e4a18c..028f3faf46e7 100644
--- a/tools/include/linux/mm.h
+++ b/tools/include/linux/mm.h
@@ -4,6 +4,7 @@
 
 #include <linux/align.h>
 #include <linux/mmzone.h>
+#include <linux/sizes.h>
 
 #define PAGE_SHIFT		12
 #define PAGE_SIZE		(_AC(1, UL) << PAGE_SHIFT)
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ