[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASwCRjnCrM9GdS7TAer-zzZEodM9N_wcfXwFWajsxPX-A@mail.gmail.com>
Date: Thu, 22 May 2025 14:31:17 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Peter Zijlstra <peterz@...radead.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, roypat@...zon.co.uk
Subject: Re: [PATCH v3 2/5] module: Add module specific symbol namespace support
On Sat, May 17, 2025 at 4:19 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra <peterz@...radead.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) <peterz@...radead.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
Powered by blists - more mailing lists