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] [day] [month] [year] [list]
Message-ID: <aWUD597aHXFXbwja@gourry-fedora-PF4VCD3F>
Date: Mon, 12 Jan 2026 09:23:35 -0500
From: Gregory Price <gourry@...rry.net>
To: Hannes Reinecke <hare@...e.de>
Cc: "David Hildenbrand (Red Hat)" <david@...nel.org>, 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
Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory
 blocks to zone movable

On Mon, Jan 12, 2026 at 08:28:29AM +0100, Hannes Reinecke wrote:
> On 1/9/26 17:41, Gregory Price wrote:
> > On Thu, Jan 08, 2026 at 03:16:24PM +0100, David Hildenbrand (Red Hat) wrote:
> > > On 1/8/26 08:31, Hannes Reinecke wrote:
> > > > On 1/6/26 21:22, David Hildenbrand (Red Hat) wrote:
> > > > > On 1/6/26 20:59, Gregory Price wrote:
> > > 
> > 
> > I'm starting to think this issue is actually the result of bad patterns
> > in the cxl driver - namely using dax as a path to hotplug sysram.
> > 
> > I suppose either we need a `cxl/dax_region/remove` that handles the
> > whole operation in one go, or
> > 
> > we want `cxl/region/commit` to handle hot(un)plug as a single action.
> > 
> > tl;dr:  Split the dax use case from the sysram use case, and make a
> >          cxl sysram driver directly manage hotplug rather than use dax.
> > 
> 
> Well ... not sure.
> We are doing fine even currently during boot up; we can align policies
> and everything to ensure the system comes up with the 'correct' setting
> Things start to get iffy if one is reconfiguring memory to move from
> daxdev to system ram and vice versa.

Hang tight, i'll post an RFC this morning that shows the idea in code.

region0/memctl/hotplug
  - if not already hotplugged, creates the memory blocks
    unless MHP auto-online or new build config set, do not auto-online

region0/memctl/hotunplug
  - remove memory and hotunplug the blocks
    Done in a single action

region0/memctl/state
  - accepts [online, online_normal, offline]
    does the action on the entire memory region under the hotplug lock
    online - ZONE_MOVABLE
    online_normal - ZONE_NORMAL

I also added the memory event callback to prevent someone from onlining
in zone normal if the last online action was 'online'.  I've tested this
on QEMU and it works fine.

~Gregory

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ