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-next>] [day] [month] [year] [list]
Message-ID: <1459116497-19991-1-git-send-email-paul.gortmaker@windriver.com>
Date:	Sun, 27 Mar 2016 18:08:14 -0400
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	<linux-kernel@...r.kernel.org>
CC:	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Andrzej Hajda <a.hajda@...sung.com>,
	Anton Blanchard <anton@...ba.org>,
	Arnd Bergmann <arnd@...db.de>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Christian Krafft <krafft@...ibm.com>,
	Hari Bathini <hbathini@...ux.vnet.ibm.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Nathan Fontenot <nfont@...ux.vnet.ibm.com>,
	Paul Mackerras <paulus@...ba.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	<linux-pm@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>
Subject: [PATCH 0/3] powerpc: remove unused modular code from non-modular drivers

My ongoing audit looking for non-modular code that needlessly uses
modular macros (vs. built-in equivalents) and/or has dead code
relating to module unloading that can never be executed led to the
creation of these three powerpc related commits.

One is of the trivial kind, where we substitute in the non-modular
versions that CPP would have put in place anyway, resulting in no
actual changes, even at the binary output level.

The other two are almost as trivial.  In addition to the above, we
toss out the __exit function registered by module_exit, since that
will never get called for non modular code/drivers.

For anyone new to the underlying goal of this cleanup, we are trying to
not use module support for code that can never be built as a module since:

 (1) it is easy to accidentally write unused module_exit and remove code
 (2) it can be misleading when reading the source, thinking it can be
     modular when the Makefile and/or Kconfig prohibit it
 (3) it requires the include of the module.h header file which in turn
     includes nearly everything else, thus adding to CPP overhead.
 (4) it gets copied/replicated into other code and spreads like weeds.

Build tested on v4.6-rc1 to ensure no silly typos that would break
compilation crept in.

---
Cc: Andrzej Hajda <a.hajda@...sung.com>
Cc: Anton Blanchard <anton@...ba.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Christian Krafft <krafft@...ibm.com>
Cc: Hari Bathini <hbathini@...ux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Nathan Fontenot <nfont@...ux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-pm@...r.kernel.org
Cc: linuxppc-dev@...ts.ozlabs.org

Paul Gortmaker (3):
  powerpc: make cell/spu_base.c explicitly non-modular
  powerpc: make kernel/nvram_64.c explicitly non-modular
  drivers/cpufreq: make ppc_cbe_cpufreq_pmi driver explicitly
    non-modular

 arch/powerpc/kernel/nvram_64.c         | 12 +-----------
 arch/powerpc/platforms/cell/spu_base.c |  7 ++-----
 drivers/cpufreq/ppc_cbe_cpufreq_pmi.c  | 15 ++-------------
 3 files changed, 5 insertions(+), 29 deletions(-)

-- 
2.6.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ