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: <88dbe97c-3510-4ce7-ae85-067243a152bd@suse.de>
Date: Wed, 7 Jan 2026 13:47:41 +0100
From: Hannes Reinecke <hare@...e.de>
To: Michal Hocko <mhocko@...e.com>, Gregory Price <gourry@...rry.net>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, kernel-team@...a.com,
 david@...hat.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
Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory
 blocks to zone movable

On 1/6/26 20:49, Michal Hocko wrote:
> On Tue 06-01-26 11:53:30, Gregory Price wrote:
>> On Tue, Jan 06, 2026 at 04:05:48PM +0100, Michal Hocko wrote:
>>> On Mon 05-01-26 15:36:11, Gregory Price wrote:
>>>> It was reported (LPC 2025) that userland services which monitor memory
>>>> blocks can cause hot-unplug to fail permanently.
>>>>
>>>> This can occur when drivers attempt to hot-remove memory in two phases
>>>> (offline, remove), while a userland service detects the memory offline
>>>> and re-onlines the memory into a zone which may prevent removal.
>>>
>>> Are there more details about this?
>>
>> The details are with Hannes, I was just recapping what was described in
>> his devmem talk at LPC ("To online or not online").
> 
> I know of policies to online newly added memory blocks but I am not
> aware of policies to re-online something that has been made offline.
>   
It's not a policy per-se, but rather a udev rule (which one could
argue _is_ a policy, mind). There is a rather long-running SLES bug
around this if you are interested...

But in either case: we cannot prevent the user from writing arbitrary
udev rules. But we should make sure that the result of udev actions
makes sense for the system.

>>> That being said, rather than movable_only, should we have a mask of
>>> online types supported for the mem block?
>>>
>>
>> I briefly considered this.  I went with this for RFC-v1 since it's
>> fairly simple and because movable is really the only zone with hotplug
>> guarantees (any other zone makes no hotplug guarantees).
>>
>> It's also significantly more complex of a change for questionable value,
>> but if people see this as the way to go i'll happily pivot to that.
> 
> Sure, I wouldn't push for more complexity just for the sake of a
> theoretical extensibility. And I have to admit I have't tried to a quick
> PoC to see how complex this could grow. I was hoping this could get into
> a simple mask for online types with default MMOP_ONLINE_KERNEL|MMOP_ONLINE_MOVABLE
> and special cases just choosing one of the two and zone_for_pfn_range
> checking for the compatibility with the requested online type. But I do
> appreciate there might be some obstacles on the way to achieve that.

Yes, and really it's only ZONE_MOVABLE for which such a treatment
makes sense currently. Once we have other zone types we might need
to re-evaluate that. But for now I guess we're fine with a simple flag.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@...e.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ