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: <20260123182526.00005ee8@huawei.com>
Date: Fri, 23 Jan 2026 18:25:26 +0000
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Gregory Price <gourry@...rry.net>
CC: "David Hildenbrand (Red Hat)" <david@...nel.org>, <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 3/8] mm/memory_hotplug: add APIs for explicit online
 type control

On Thu, 22 Jan 2026 19:34:10 -0500
Gregory Price <gourry@...rry.net> wrote:

> On Thu, Jan 22, 2026 at 11:41:24PM +0100, David Hildenbrand (Red Hat) wrote:
> > 
> > Right, but I don't want any other OOT kernel module to be able to make use
> > of add_memory_driver_managed() to do arbitrary things, because we don't know
> > if it's really user space setting the policy for that memory then.
> >   
> 
> Ah, this was lost on me.
> 
> > So either restrict add_memory_driver_managed() to kmem+virtio_mem
> > completely, or add another variant that will be kmem-only (or however that
> > dax/cxl module is called).  
> 
> unclear to me how to restrict a function to specific drivers, but i can
> add add_and_online_memory_driver_managed() trivially so no big issue.

Is EXPORT_SYMBOL_GPL_FOR_MODULE() enough?

> 
> You'd be ok with with this?
> 
> add_and_online_memory_driver_managed(..., online_type) {
>    ... existing add_memory_driver_managed() code ...
> }
> 
> add_memory_driver_managed(...) {
>    add_and_online_memory_driver_managed(..., mhp_get_default_policy());
> }

> 
> ~Gregory
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ