]> asedeno.scripts.mit.edu Git - linux.git/commit
module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol conflict
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 3 Oct 2019 07:58:23 +0000 (16:58 +0900)
committerJessica Yu <jeyu@kernel.org>
Mon, 7 Oct 2019 16:25:06 +0000 (18:25 +0200)
commitfa6643cdc5cd726b10d30eec45ff8dca267de735
treea27b989e6ee2e6cd715764d518bb16df5c59a8ef
parent389eb3f5f4abbdb9810458ac9b87427336ba5b91
module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol conflict

The module namespace produces __strtab_ns_<sym> symbols to store
namespace strings, but it does not guarantee the name uniqueness.
This is a potential problem because we have exported symbols starting
with "ns_".

For example, kernel/capability.c exports the following symbols:

  EXPORT_SYMBOL(ns_capable);
  EXPORT_SYMBOL(capable);

Assume a situation where those are converted as follows:

  EXPORT_SYMBOL_NS(ns_capable, some_namespace);
  EXPORT_SYMBOL_NS(capable, some_namespace);

The former expands to "__kstrtab_ns_capable" and "__kstrtab_ns_ns_capable",
and the latter to "__kstrtab_capable" and "__kstrtab_ns_capable".
Then, we have the duplicated "__kstrtab_ns_capable".

To ensure the uniqueness, rename "__kstrtab_ns_*" to "__kstrtabns_*".

Reviewed-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
include/linux/export.h