mbox series

[v2,0/6] module: various bug-fixes and clean-ups for module namespace

Message ID 20191003075826.7478-1-yamada.masahiro@socionext.com (mailing list archive)
Headers show
Series module: various bug-fixes and clean-ups for module namespace | expand

Message

Masahiro Yamada Oct. 3, 2019, 7:58 a.m. UTC
I was hit by some problems caused by the module namespace feature
that was merged recently. At least, the breakage of
external module builds is a fatal one. I just took a look at the code
closer, and I noticed some more issues (some are nit-picking).

V2:
 - I dropped "module: avoid code duplication in include/linux/export.h"
   because Matthias offered to refactor the code by himself.

 - V1 missed the problem when a symbol is preloaded before
  sym_add_exported() is called.  I fixed it too.



Masahiro Yamada (6):
  module: swap the order of symbol.namespace
  modpost: fix broken sym->namespace for external module builds
  module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol
    conflict
  kbuild: fix build error of 'make nsdeps' in clean tree
  nsdeps: fix hashbang of scripts/nsdeps
  nsdeps: make generated patches independent of locale

 Makefile               |  2 +-
 include/linux/export.h | 10 +++++-----
 scripts/mod/modpost.c  | 29 +++++++++++++++--------------
 scripts/nsdeps         |  4 ++--
 4 files changed, 23 insertions(+), 22 deletions(-)

Comments

Jessica Yu Oct. 7, 2019, 4:43 p.m. UTC | #1
+++ Masahiro Yamada [03/10/19 16:58 +0900]:
>
>I was hit by some problems caused by the module namespace feature
>that was merged recently. At least, the breakage of
>external module builds is a fatal one. I just took a look at the code
>closer, and I noticed some more issues (some are nit-picking).
>
>V2:
> - I dropped "module: avoid code duplication in include/linux/export.h"
>   because Matthias offered to refactor the code by himself.
>
> - V1 missed the problem when a symbol is preloaded before
>  sym_add_exported() is called.  I fixed it too.

Hi Masahiro!

Thanks for the v2. I've queued this up in the module tree with the
intention of getting the fixes in for -rc3.

Matthias is working on some modpost fixes that would get rid of the
__ksymtab_<symbol>.<ns>/__ksymtab_<ns>.<symbol> naming scheme
altogether in favor of just getting the namespace string from
__kstrtabns and __ksymtab_strings -- this may render patch 1
unnecessary. But since we want to fix this asap, we can just keep it
and apply Matthias's fix on top later.

Thanks!

Jessica