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: <CAK7LNARNbu7vxwW5YvpnUxTAcdFfvakDbeTarp06+e3q1uJWxg@mail.gmail.com>
Date: Sat, 17 May 2025 16:19:53 +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 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.







--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ