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: <aWfOVd3_GGTNHKNt@gourry-fedora-PF4VCD3F>
Date: Wed, 14 Jan 2026 12:11:49 -0500
From: Gregory Price <gourry@...rry.net>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: linux-mm@...ck.org, linux-cxl@...r.kernel.org, nvdimm@...ts.linux.dev,
	linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
	kernel-team@...a.com, dan.j.williams@...el.com,
	vishal.l.verma@...el.com, dave.jiang@...el.com, mst@...hat.com,
	jasowang@...hat.com, xuanzhuo@...ux.alibaba.com,
	eperezma@...hat.com, osalvador@...e.de, akpm@...ux-foundation.org
Subject: Re: [PATCH 2/8] mm/memory_hotplug: extract __add_memory_resource()
 and __offline_memory()

On Wed, Jan 14, 2026 at 11:14:21AM +0100, David Hildenbrand (Red Hat) wrote:
> On 1/14/26 09:51, Gregory Price wrote:
> > Extract internal helper functions with explicit parameters to prepare
> > for adding new APIs that allow explicit online type control:
> > 
> >    - __add_memory_resource(): accepts an explicit online_type parameter.
> >      Add MMOP_SYSTEM_DEFAULT as a new value that instructs the function
> >      to use mhp_get_default_online_type() for the actual online type.
> >      The existing add_memory_resource() becomes a thin wrapper that
> >      passes MMOP_SYSTEM_DEFAULT to preserve existing behavior.
> > 
> >    - __offline_memory(): extracted from offline_and_remove_memory() to
> >      handle the offline operation with rollback support. The caller
> >      now handles locking and the remove step separately.
> 
> 
> I don't understand why this change is even part of this patch, can you
> elaborate? You don't add any "explicit parameters to prepare for adding new
> APIs that allow explicit online type control" there.
> 
> So likely you squeezed two independent things into a single patch? :)
>
> Likely you should pair the __add_memory_resource() change with the
> add_memory_driver_managed() changed and vice versa.
> 

I tried to keep the refactor work and the new feature work separate.

But yeah that's fair i can just add them to the respective path.

> > +	/* Use system default online type from mhp_get_default_online_type(). */
> > +	MMOP_SYSTEM_DEFAULT,
> 
> I don't like having fake options as part of this interface.
> 
> Why can't we let selected users use mhp_get_default_online_type() instead?
> Like add_memory_resource(). We can export that function.
> 

Wasn't sure if that was preferred, I can do that.

I think i eventually ended up doing that in DAX anyway, I just never
came back around to clean it up.

ack.

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ