linux/Documentation
Jacob Keller 7dfbea4c46 scripts: remove namespace.pl
namespace.pl is intended to help locate symbols which are defined but
are not used externally. The goal is to avoid bloat of the namespace in
the resulting kernel image.

The script relies on object data, and only finds unused symbols for the
configuration used to generate that object data. This results in a lot
of false positive warnings such as symbols only used by a single
architecture, or symbols which are used externally only under certain
configurations.

Running namespace.pl using allyesconfig, allmodconfig, and
x86_64_defconfig yields the following results:

* allmodconfig
  * 11122 unique symbol names with no external reference
  * 1194 symbols listed as multiply defined
  * 214 symbols it can't resolve
* allyesconfig
  * 10997 unique symbol names with no external reference
  * 1194 symbols listed as multiply defined
  * 214 symbols it can't resolve
* x86_64_defconfig
  * 5757 unique symbol names with no external reference
  * 528 symbols listed as multiply defined
  * 154 symbols it can't resolve

The script also has no way to easily limit the scope of the checks to
a given subset of the kernel, such as only checking for symbols defined
within a module or subsystem.

Discussion on public mailing lists seems to indicate that many view the
tool output as suspect or not very useful (see discussions at [1] and
[2] for further context).

As described by Masahiro Yamada at [2], namespace.pl provides 3 types of
checks: listing multiply defined symbols, resolving external symbols,
and warnings about symbols with no reference.

The first category of issues is easily caught by the linker as any set
of multiply defined symbols should fail to link. The second category of
issues is also caught by linking, as undefined symbols would cause
issues. Even with modules, these types of issues where a module relies
on an external symbol are caught by modpost.

The remaining category of issues reported is the list of symbols with no
external reference, and is the primary motivation of this script.
However, it ought to be clear from the above examples that the output is
difficult to sort through. Even allyesconfig has ~10000 entries.

The current submit-checklist indicates that patches ought to go through
namespacecheck and fix any new issues arising. But that itself presents
problems. As described at [1], many cases of reports are due to
configuration where a function is used externally by some configuration
settings. Prominent maintainers appear to dislike changes modify code
such that symbols become static based on CONFIG_* flags ([3], and [4])

One possible solution is to adjust the advice and indicate that we only
care about the output of namespacecheck on allyesconfig or allmodconfig
builds...

However, given the discussion at [2], I suspect that few people are
actively using this tool. It doesn't have a maintainer in the
MAINTAINERS flie, and it produces so many warnings for unused symbols
that it is difficult to use effectively. Thus, I propose we simply
remove it.

[1] https://lore.kernel.org/netdev/20200708164812.384ae8ea@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
[2] https://lore.kernel.org/lkml/20190129204319.15238-1-jacob.e.keller@intel.com/
[3] https://lore.kernel.org/netdev/20190828.154744.2058157956381129672.davem@davemloft.net/
[4] https://lore.kernel.org/netdev/20190827210928.576c5fef@cakuba.netronome.com/

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-10-12 01:58:53 +09:00
..
ABI powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver 2020-08-21 23:35:27 +10:00
accounting
admin-guide A set of EFI fixes: 2020-08-23 11:08:32 -07:00
arm ARM development for 5.9-rc1: 2020-08-06 10:17:00 -07:00
arm64 IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
block for-5.9/drivers-20200803 2020-08-05 10:51:40 -07:00
bpf doc: Add link to bpf helpers man page 2020-08-13 22:48:06 +02:00
cdrom A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
core-api A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
cpu-freq
crypto It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
dev-tools A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
devicetree Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-23 10:52:33 -07:00
doc-guide
driver-api - Core Frameworks 2020-08-15 08:09:38 -07:00
fault-injection block: rename generic_make_request to submit_bio_noacct 2020-07-01 07:27:24 -06:00
fb drm next for 5.9-rc1 2020-08-05 19:50:06 -07:00
features A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
filesystems Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
firmware_class
firmware-guide ACPI: Replace HTTP links with HTTPS ones 2020-07-27 14:47:08 +02:00
fpga Char/Misc driver patches for 5.9-rc1 2020-08-05 11:43:47 -07:00
gpu - Core Frameworks 2020-08-11 13:48:02 -07:00
hid docs: hid: Convert link to https 2020-07-13 11:26:37 -06:00
hwmon hwmon updates for v5.9 2020-08-05 13:13:57 -07:00
i2c Merge branch 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2020-08-13 18:41:00 -07:00
ia64 docs: ia64: correct typo 2020-07-31 11:09:09 -06:00
ide
iio
infiniband
input Input: uinput - fix typo in function name documentation 2020-07-28 18:24:11 -07:00
isdn
kbuild Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
kernel-hacking
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
litmus-tests Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test 2020-06-29 12:05:18 -07:00
livepatch
locking A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
m68k
maintainer Documentation: maintainer-entry-profile: eliminate duplicated word 2020-07-13 09:44:07 -06:00
mhi
mips It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
misc-devices Documentation: misc/xilinx_sdfec: eliminate duplicated word 2020-07-13 09:44:07 -06:00
netlabel
networking docs: networking: bonding.rst resources section cleanup 2020-08-14 16:44:20 -07:00
nios2
nvdimm
openrisc docs: openrisc: Replace HTTP links with HTTPS ones 2020-07-13 11:34:09 -06:00
parisc
PCI pci-v5.9-changes 2020-08-07 18:48:15 -07:00
pcmcia
power Merge branches 'pm-sleep', 'pm-domains', 'powercap' and 'pm-tools' 2020-08-03 13:12:44 +02:00
powerpc PPC KVM update for 5.9 2020-08-09 13:24:02 -04:00
process scripts: remove namespace.pl 2020-10-12 01:58:53 +09:00
RCU These are the latest RCU bits for v5.9: 2020-08-03 14:31:33 -07:00
riscv
s390 It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
scheduler sched/doc: Factorize bits between sched-energy.rst & sched-capacity.rst 2020-08-01 09:19:43 +02:00
scsi scsi: advansys: docs: Eliminate duplicated word 2020-07-08 01:32:11 -04:00
security Documentation: security/keys: eliminate duplicated word 2020-07-13 09:45:03 -06:00
sh
sound ASoC: Updates for v5.9 2020-08-03 14:41:43 +02:00
sparc
sphinx
sphinx-static
spi SPI SUBSYSTEM: Replace HTTP links with HTTPS ones 2020-07-09 22:41:11 +01:00
staging remoteproc updates for v5.9 2020-08-11 11:17:45 -07:00
target
timers docs: timers: drop documentation about LB_BIAS 2020-07-23 14:32:44 -06:00
trace A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
translations A handful of obvious fixes that wandered in during the merge window. 2020-08-13 13:57:45 -07:00
usb USB: Replace HTTP links with HTTPS ones 2020-07-21 13:41:57 +02:00
userspace-api remoteproc updates for v5.9 2020-08-11 11:17:45 -07:00
virt powerpc updates for 5.9 2020-08-07 10:33:50 -07:00
vm mm/vmstat: add events for THP migration without split 2020-08-12 10:57:57 -07:00
w1
watchdog watchdog: add support for adjusting last known HW keepalive time 2020-08-05 18:43:02 +02:00
x86 It's been a busy cycle for documentation - hopefully the busiest for a 2020-08-04 22:47:54 -07:00
xtensa
.gitignore
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt Documentation/litmus-tests/atomic: Add a test for smp_mb__after_atomic() 2020-06-29 12:05:18 -07:00
Changes
CodingStyle
conf.py
COPYING-logo
docutils.conf
dontdiff Documentation: dontdiff: Add zstd compressed files 2020-07-31 11:51:10 +02:00
index.rst docs: index.rst: Add watch_queue 2020-07-23 14:13:23 -06:00
Kconfig
logo.gif
Makefile
memory-barriers.txt powerpc updates for 5.9 2020-08-07 10:33:50 -07:00
SubmittingPatches
watch_queue.rst