[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250502131139.GC4198@noisy.programming.kicks-ass.net>
Date: Fri, 2 May 2025 15:11:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: mcgrof@...nel.org, x86@...nel.org, hpa@...or.com, petr.pavlu@...e.com,
samitolvanen@...gle.com, da.gomez@...sung.com, nathan@...nel.org,
nicolas@...sle.eu, linux-kernel@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kbuild@...r.kernel.org,
hch@...radead.org, gregkh@...uxfoundation.org
Subject: Re: [PATCH -v2 5/7] module: Extend the MODULE_ namespace parsing
On Sat, Feb 08, 2025 at 12:45:21AM +0900, Masahiro Yamada wrote:
> On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > Instead of only accepting "MODULE_${name}", extend it with a comma
> > separated list of module names and add tail glob support.
> >
> > That is, something like: "MODULE_foo-*,bar" is now possible.
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
> > kernel/module/main.c | 39 ++++++++++++++++++++++++++++++++++-----
> > scripts/mod/modpost.c | 40 ++++++++++++++++++++++++++++++++++------
> > 2 files changed, 68 insertions(+), 11 deletions(-)
> >
>
> > static void check_exports(struct module *mod)
> > {
> > struct symbol *s, *exp;
> > @@ -1714,7 +1741,8 @@ static void check_exports(struct module
> >
> > basename = mod_basename(mod->name);
> >
> > - if (!contains_namespace(&mod->imported_namespaces, exp->namespace)) {
> > + if (!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);
> >
>
> When module_namespace() fails, the following error message is shown:
>
> ERROR: modpost: module bar uses symbol foo from namespace
> MODULE_kvm, but does not import it.
>
>
> We get a hint from this error message, but the solution
> is not MODULE_IMPORT_NS();
>
> 'make nsdeps' will try to solve this by adding
>
> MODULE_IMPORT_NS("MODULE_kvm");
>
> Apparently, this does not work.
>
> Not sure if you want to solve the issue.
Seems unsolvable by construction; so no.
Powered by blists - more mailing lists