Commit c6f6ebd7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'modules-for-v5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux

Pull module fixes from Jessica Yu:
 "Code cleanups and kbuild/namespace related fixups from Masahiro.

  Most importantly, it fixes a namespace-related modpost issue for
  external module builds

   - Fix broken external module builds due to a modpost bug in
     read_dump(), where the namespace was not being strdup'd and
     sym->namespace would be set to bogus data.

   - Various namespace-related kbuild fixes and cleanups thanks to
     Masahiro Yamada"

* tag 'modules-for-v5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  doc: move namespaces.rst from kbuild/ to core-api/
  nsdeps: make generated patches independent of locale
  nsdeps: fix hashbang of scripts/nsdeps
  kbuild: fix build error of 'make nsdeps' in clean tree
  module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol conflict
  modpost: fix broken sym->namespace for external module builds
  module: swap the order of symbol.namespace
  scripts: add_namespace: Fix coccicheck failed
parents 56c642e2 fcfacb9f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ Core utilities
   protection-keys
   ../RCU/index
   gcc-plugins
   symbol-namespaces


Interfaces for kernel debugging
+1 −0
Original line number Diff line number Diff line
@@ -11544,6 +11544,7 @@ NSDEPS
M:	Matthias Maennich <maennich@google.com>
S:	Maintained
F:	scripts/nsdeps
F:	Documentation/core-api/symbol-namespaces.rst
NTB AMD DRIVER
M:	Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+1 −1
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ endif
# in addition to whatever we do anyway.
# Just "make" or "make all" shall build modules as well

ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
ifneq ($(filter all _all modules nsdeps,$(MAKECMDGOALS)),)
  KBUILD_MODULES := 1
endif

+5 −5
Original line number Diff line number Diff line
@@ -52,10 +52,10 @@ extern struct module __this_module;
	__ADDRESSABLE(sym)						\
	asm("	.section \"___ksymtab" sec "+" #sym "\", \"a\"	\n"	\
	    "	.balign	4					\n"	\
	    "__ksymtab_" #sym NS_SEPARATOR #ns ":		\n"	\
	    "__ksymtab_" #ns NS_SEPARATOR #sym ":		\n"	\
	    "	.long	" #sym "- .				\n"	\
	    "	.long	__kstrtab_" #sym "- .			\n"	\
	    "	.long	__kstrtab_ns_" #sym "- .		\n"	\
	    "	.long	__kstrtabns_" #sym "- .			\n"	\
	    "	.previous					\n")

#define __KSYMTAB_ENTRY(sym, sec)					\
@@ -76,10 +76,10 @@ struct kernel_symbol {
#else
#define __KSYMTAB_ENTRY_NS(sym, sec, ns)				\
	static const struct kernel_symbol __ksymtab_##sym##__##ns	\
	asm("__ksymtab_" #sym NS_SEPARATOR #ns)				\
	asm("__ksymtab_" #ns NS_SEPARATOR #sym)				\
	__attribute__((section("___ksymtab" sec "+" #sym), used))	\
	__aligned(sizeof(void *))					\
	= { (unsigned long)&sym, __kstrtab_##sym, __kstrtab_ns_##sym }
	= { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym }

#define __KSYMTAB_ENTRY(sym, sec)					\
	static const struct kernel_symbol __ksymtab_##sym		\
@@ -112,7 +112,7 @@ struct kernel_symbol {
/* For every exported symbol, place a struct in the __ksymtab section */
#define ___EXPORT_SYMBOL_NS(sym, sec, ns)				\
	___export_symbol_common(sym, sec);				\
	static const char __kstrtab_ns_##sym[]				\
	static const char __kstrtabns_##sym[]				\
	__attribute__((section("__ksymtab_strings"), used, aligned(1)))	\
	= #ns;								\
	__KSYMTAB_ENTRY_NS(sym, sec, ns)
Loading