lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAT9yyCFApF=HgmvTjHiAyAagzvRfu+cx0_D+7FBxpzk9Q@mail.gmail.com>
Date: Sat, 8 Feb 2025 00:45:21 +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
Subject: Re: [PATCH -v2 5/7] module: Extend the MODULE_ namespace parsing

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.



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ