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-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 20 Mar 2024 02:42:13 +0000
From: kaiyang2@...cmu.edu
To: linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Cc: Kaiyang Zhao <kaiyang2@...cmu.edu>,
	hannes@...xchg.org,
	ziy@...dia.com,
	dskarlat@...cmu.edu
Subject: [RFC PATCH 2/7] Disallows high-order movable allocations in other zones if ZONE_MOVABLE is populated

From: Kaiyang Zhao <kaiyang2@...cmu.edu>

Use ZONE_MOVABLE exclusively for non-0 order allocations

Signed-off-by: Kaiyang Zhao <zh_kaiyang@...mail.com>
---
 mm/page_alloc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 47421bedc12b..9ad9357e340a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3403,6 +3403,16 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 		struct page *page;
 		unsigned long mark;
 
+		/*
+		 * Disallows high-order movable allocations in other zones if
+		 * ZONE_MOVABLE is populated on this node.
+		 */
+		if (ac->highest_zoneidx >= ZONE_MOVABLE &&
+			order > 0 &&
+			zone_idx(zone) != ZONE_MOVABLE &&
+			populated_zone(&(zone->zone_pgdat->node_zones[ZONE_MOVABLE])))
+				continue;
+
 		if (cpusets_enabled() &&
 			(alloc_flags & ALLOC_CPUSET) &&
 			!__cpuset_zone_allowed(zone, gfp_mask))
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ