On Sat, May 17, 2025 at 4:19 PM Masahiro Yamada <masahi...@kernel.org> wrote: > > On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra <pet...@infradead.org> wrote: > > > > Designate the "module:${modname}" symbol namespace to mean: 'only > > export to the named module'. > > > > Notably, explicit imports of anything in the "module:" space is > > forbidden. > > > > Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> > > --- > > > > static void check_exports(struct module *mod) > > { > > struct symbol *s, *exp; > > @@ -1709,7 +1717,8 @@ static void check_exports(struct module > > > > basename = get_basename(mod->name); > > > > - if (!contains_namespace(&mod->imported_namespaces, > > exp->namespace)) { > > + if (!verify_module_namespace(exp->namespace, basename) && > > + !contains_namespace(&mod->imported_namespaces, > > exp->namespace)) { > > modpost_log(!allow_missing_ns_imports, > > "module %s uses symbol %s from > > namespace %s, but does not import it.\n", > > basename, exp->name, exp->namespace); > > > > > > > I believe this code is wrong because "make nsdeps" would > incorrectly add MOULDE_IMPORT_NS(). > > > When MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y, > EXPORT_SYMBOL_NS(foo, "module:bar") can be used by > any module or not. > That is not what we have decided yet. > > At least, MODULE_IMPORT_NS("module:bar"); > does not solve the issue at all.
Peter is not responding to my feedback. I will apply this and fix the code by myself on top of that. -- Best Regards Masahiro Yamada