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: <20250428065727.57990-1-igor.b@beldev.am>
Date: Mon, 28 Apr 2025 08:57:27 +0200
From: Igor Belousov <igor.b@...dev.am>
To: linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Cc: akpm@...ux-foundation.org,
	hannes@...xchg.org,
	minchan@...nel.org,
	nphamcs@...il.com,
	senozhatsky@...omium.org,
	shakeel.butt@...ux.dev,
	yosry.ahmed@...ux.dev,
	Igor Belousov <igor.b@...dev.am>
Subject: [PATCH mm-new] mm/zblock: avoid failing the build

Don't break the build for a PAGE_SIZE that is not fully supported,
just print out a warning in that case.

Signed-off-by: Igor Belousov <igor.b@...dev.am>
---
 mm/zblock.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/zblock.h b/mm/zblock.h
index fd72961c077a..8610196b651e 100644
--- a/mm/zblock.h
+++ b/mm/zblock.h
@@ -21,7 +21,8 @@
 /* max 256 slots per block, max table size 64 */
 #define SLOT_BITS 8
 #else
-#error Unsupported PAGE_SIZE
+#warn This PAGE_SIZE is not quite supported yet
+#define SLOT_BITS 8
 #endif
 
 #define MAX_SLOTS (1 << SLOT_BITS)
@@ -101,7 +102,7 @@ static const struct block_desc block_desc[] = {
 	{ SLOT_SIZE(10, 3), 10, 3 },
 	{ SLOT_SIZE(9, 3), 9, 3 },
 	{ SLOT_SIZE(4, 2), 4, 2 },
-#elif PAGE_SIZE == 0x4000
+#else
 	{ SLOT_SIZE(255, 0), 255, 0 },
 	{ SLOT_SIZE(185, 0), 185, 0 },
 	{ SLOT_SIZE(145, 0), 145, 0 },
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ