On Wed, Nov 06, 2024 at 08:02:40PM +0100, Peter Zijlstra wrote: > It reserves and disallows imports on any "MODULE_${name}" namespace, > while it implicitly adds the same namespace to every module. Ah nice. This is pretty similar to what I want and had badly prototyped a while ago. > This allows exports targeted at specific modules and no others -- one > random example included. I've hated the various kvm exports we've had > for a while, and strictly limiting them to the kvm module helps > alleviate some abuse potential. And this was one of the targets on my list. Specific kunits tests would be another category. > +EXPORT_SYMBOL_NS_GPL(fpu_swap_kvm_fpstate, MODULE_kvm); I would have preferred a syntax that has the MODULE in the export macro instead of the namespace, but I do care more about actually having the functionality, and this seems way simpler than what I had.