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-prev] [day] [month] [year] [list]
Message-ID: <a22629dc-c8c0-207d-b9ba-2d72e40cbf80@ti.com>
Date:   Mon, 4 Feb 2019 15:25:46 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Paul Gortmaker <paul.gortmaker@...driver.com>
CC:     <linux-kernel@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>,
        Gregory CLEMENT <gregory.clement@...e-electrons.com>
Subject: Re: [PATCH 0/3] phy: remove needless usage of module header



On 10/12/18 6:04 AM, Paul Gortmaker wrote:
> The most important thing to note here, is these clean-ups make no
> changes to the final generated run-time.  The 1st commit removes an
> unused function, otherwise the generated objects are also unchanged.
> 
> The work here represents a scan over the phy dir, looking for files
> that have nothing to do with a modular use case, but are using modular
> infrastructure regardless.
> 
> We are trying to make driver code consistent with the Makefiles/Kconfigs
> that control them.  This means not using modular functions/macros for
> drivers that can never be built as a module.  This has been done in quite
> a lot of other mainline subsystem dirs already.
> 
> Using modular infrastructure in non-modules might seem harmless, but some
> of the downfalls this leads to are:
> 
>  (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 drivers and spreads quickly.
> 
> As a data point for #3 above, an empty C file that just includes the
> module.h header generates over 750kB of CPP output.  Repeating the same
> experiment with init.h and the result is less than 12kB; with export.h
> it is only about 1/2kB; with both it still is less than 12kB.
> 
> Build tested on x86-64 and ARM-64.

merged, thanks!

-Kishon
> 
> Paul.
> ---
> 
> Cc: Andrew Lunn <andrew@...n.ch>
> Cc: Gregory CLEMENT <gregory.clement@...e-electrons.com>
> Cc: Kishon Vijay Abraham I <kishon@...com>
> 
> Paul Gortmaker (3):
>   phy: make phy-core explicitly non-modular
>   phy: make phy-mvebu-sata explicitly non-modular
>   phy: make phy-armada375-usb2 explicitly non-modular
> 
>  drivers/phy/marvell/phy-armada375-usb2.c |  8 +-------
>  drivers/phy/marvell/phy-mvebu-sata.c     |  9 ++-------
>  drivers/phy/phy-core.c                   | 12 +-----------
>  3 files changed, 4 insertions(+), 25 deletions(-)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ