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: <793fb531-1fda-4de4-b73f-fb46444ca613@kernel.org>
Date: Wed, 28 Jan 2026 00:06:01 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Gregory Price <gourry@...rry.net>,
 Jonathan Cameron <jonathan.cameron@...wei.com>
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 3/8] mm/memory_hotplug: add APIs for explicit online type
 control

On 1/23/26 20:12, Gregory Price wrote:
> On Fri, Jan 23, 2026 at 06:25:26PM +0000, Jonathan Cameron wrote:
>> On Thu, 22 Jan 2026 19:34:10 -0500
>> Gregory Price <gourry@...rry.net> wrote:
>>
>>>
>>> Ah, this was lost on me.
>>>
>>>
>>> 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?

It's also fine for me to just limit add_memory_driver_managed() to 
in-tree driver by using EXPORT_SYMBOL_FOR_MODULES.

But it might make nvidia unhappy :)

So maybe just adding a __add_memory_driver_managed() that gives us more 
control and using EXPORT_SYMBOL_FOR_MODULES is being a bit nicer for OOT 
modules.


(I guess __add_memory_driver_managed is a better name than 
add_and_online_memory_driver_managed, thinking about it)

>>
> 
> Is the issue just that add_memory_driver_manage is `extern`?  

Heh, the "extern" is simply not necessary and can be dropped from all 
such functions. Not related to this. It's all about EXPORT_SYMBOL_GPL 
allowing anything that claims to be a GPL module to use this functionality.

> If so
> yeah, i can just do the EXPORT_*_GPL path.
> 
> If you prefer FOR_MODULE, then yes I can do this.

I'd go for

	EXPORT_SYMBOL_FOR_MODULES(__add_memory_driver_managed, "dax")

(or would it be the kmem module?)

-- 
Cheers

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ