On Fri, Jan 23, 2026 at 06:25:26PM +0000, Jonathan Cameron wrote:
> On Thu, 22 Jan 2026 19:34:10 -0500
> Gregory Price <[email protected]> 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?
> 

Is the issue just that add_memory_driver_manage is `extern`?  If so
yeah, i can just do the EXPORT_*_GPL path.

If you prefer FOR_MODULE, then yes I can do this.

~Gregory

Reply via email to