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: <aV0_SMq_I_R7ikF3@gourry-fedora-PF4VCD3F>
Date: Tue, 6 Jan 2026 11:58:48 -0500
From: Gregory Price <gourry@...rry.net>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel-team@...a.com,
	osalvador@...e.de, gregkh@...uxfoundation.org, rafael@...nel.org,
	dakr@...nel.org, akpm@...ux-foundation.org,
	lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
	rppt@...nel.org, surenb@...gle.com, mhocko@...e.com, hare@...e.de
Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory
 blocks to zone movable

On Tue, Jan 06, 2026 at 04:24:21PM +0100, David Hildenbrand (Red Hat) wrote:
> > +/*
> > + * Restrict hotplugged memory blocks to ZONE_MOVABLE only.
> > + *
> > + * During offlining of hotplugged memory which was originally onlined
> > + * as ZONE_MOVABLE, userland services may detect blocks going offline
> > + * and automatically re-online them into ZONE_NORMAL or lower.  When
> > + * this happens it may become permanently incapable of being removed.
> 
> If it's really only that, we could also look into simply making a re-online
> without a specific mode ("online") to use the previous mode.
> 
> We could glue that to the "contig-zones" policy only, to not affect
> "auto-movable".
> 
> That is, remember the zone to which it was previously onlined, and then
> simply re-online to that one.
> 

I know we do this in memory_hotplug.c to rollback to prior state.

I did notice in... i think it was either memory.c or hotplug.c... that
we end up setting mem->online_type=MMOP_OFFLINE after comping an online
operation.  That seemed confusing and maybe we can use that to store the
current state.

I'm not against this idea, but it also makes the sysfs a little more
confusing (`echo online` now does different things based on prior
state).  I preferred just failing if the block wasn't compatible with
the zone (maybe making it more clear with a dmesg print?)

Anyway, let me know what your preference is, happy to pivot however.

Hopefully Hannes can add additional feedback and guidance here.

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ