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]
Message-Id: <20250616183755.16fbdd5e867752db14e321cc@linux-foundation.org>
Date: Mon, 16 Jun 2025 18:37:55 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Zi Yan <ziy@...dia.com>
Cc: linux-mm@...ck.org, David Hildenbrand <david@...hat.com>, Johannes
 Weiner <hannes@...xchg.org>, Vlastimil Babka <vbabka@...e.cz>, Oscar
 Salvador <osalvador@...e.de>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
 "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Mel Gorman
 <mgorman@...hsingularity.net>, Suren Baghdasaryan <surenb@...gle.com>,
 Michal Hocko <mhocko@...e.com>, Brendan Jackman <jackmanb@...gle.com>,
 Richard Chang <richardycc@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 0/6] Make MIGRATE_ISOLATE a standalone bit

On Mon, 16 Jun 2025 08:10:13 -0400 Zi Yan <ziy@...dia.com> wrote:

> Hi all,
> 
> This patchset moves MIGRATE_ISOLATE to a standalone bit to avoid
> being overwritten during pageblock isolation process. Currently,
> MIGRATE_ISOLATE is part of enum migratetype (in include/linux/mmzone.h),
> thus, setting a pageblock to MIGRATE_ISOLATE overwrites its original
> migratetype. This causes pageblock migratetype loss during
> alloc_contig_range() and memory offline, especially when the process
> fails due to a failed pageblock isolation and the code tries to undo the
> finished pageblock isolations.
> 
> It is on top of mm-everything-2025-06-15-23-48.

mm-new would be a better target.  mm-new is not (yet) included in
linux-next, hence it is not in mm-everything.

I hit a few issues (x86_64 allmodconfig):

In file included from ./include/linux/slab.h:16,
                 from ./include/linux/irq.h:21,
                 from ./include/linux/of_irq.h:7,
                 from drivers/gpu/drm/msm/hdmi/hdmi.c:9:
./include/linux/gfp.h:428:25: error: expected identifier before '(' token
  428 | #define ACR_NONE        ((__force acr_flags_t)0)        // ordinary allocation request
      |                         ^
drivers/gpu/drm/msm/generated/hdmi.xml.h:71:9: note: in expansion of macro 'ACR_NONE'
   71 |         ACR_NONE = 0,
      |         ^~~~~~~~



And this was needed:

kernel/kexec_handover.c uses set_pageblock_migratetype()

--- a/include/linux/page-isolation.h~mm-page_isolation-remove-migratetype-from-move_freepages_block_isolate-fix
+++ a/include/linux/page-isolation.h
@@ -45,6 +45,8 @@ void __meminit init_pageblock_migratetyp
 					  enum migratetype migratetype,
 					  bool isolate);
 
+void set_pageblock_migratetype(struct page *page, enum migratetype migratetype);
+
 bool pageblock_isolate_and_move_free_pages(struct zone *zone, struct page *page);
 bool pageblock_unisolate_and_move_free_pages(struct zone *zone, struct page *page);
 
--- a/mm/page_alloc.c~mm-page_isolation-remove-migratetype-from-move_freepages_block_isolate-fix
+++ a/mm/page_alloc.c
@@ -525,8 +525,7 @@ void clear_pfnblock_bit(const struct pag
  * @page: The page within the block of interest
  * @migratetype: migratetype to set
  */
-static void set_pageblock_migratetype(struct page *page,
-				      enum migratetype migratetype)
+void set_pageblock_migratetype(struct page *page, enum migratetype migratetype)
 {
 	if (unlikely(page_group_by_mobility_disabled &&
 		     migratetype < MIGRATE_PCPTYPES))
_


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ