Hi Nicholas, On Wed, Jan 7, 2026 at 8:47 PM Nicholas Sielicki <[email protected]> wrote: > > Currently, the only way for userspace to determine which symbol > namespaces a module imports is to locate the .ko file on disk (which may > not match the loaded module), then either parsing the binary manually > and handling any potential compression, or shelling-out to modinfo. > > This is painful in cases where userspace wants to distinguish between > module variants that share the same name but import different > namespaces. For example, the nvidia-uvm module exists in both open and > closed source variants; the open source version imports the DMA_BUF > namespace while the closed source version does not, and networking > middleware may want to initialize itself differently depending on that. > > Add /sys/module/*/import_ns to expose imported namespaces for loaded > modules. The file contains one namespace per line and only exists for > modules that import at least one namespace.
The patches look reasonable to me, but I do wonder if examining imported namespaces is the best way to distinguish between module variants. Is looking at /sys/module/*/taint not sufficient for your use case? Sami

