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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 2 Feb 2018 14:56:51 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Linus Walleij <linus.walleij@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ingo Molnar <mingo@...nel.org>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        linux-gpio@...r.kernel.org
Subject: Re: [GIT PULL] pin control bulk changes for v4.16

On Fri, Feb 2, 2018 at 5:28 AM, Linus Walleij <linus.walleij@...aro.org> wrote:
>
> here is the big slew of changes in pin control for the v4.16 cycle.

So I pulled this, and then was surprised by how *everything* got
rebuilt even though it only touched pinctl files.

The reason for that seems to be that the pinctl pull got me this:

   include/linux/pinctrl/devinfo.h                    |    2 +

and in include/linux/device.h we have

  #include <linux/pinctrl/devinfo.h>

so pretty much *every* driver ends up depending on that silly two-line change.

I *think* that the only reason that happens is because of this:

  #ifdef CONFIG_PINCTRL
          struct dev_pin_info     *pins;
  #endif

and honestly, that could be trivially done by just having a forward
declaration, replacing the pinctrl/devinfo.h header include entirely.

Ironically, that two-line change to pinctrl/devinfo.h was a forward
declaration in the exact reverse direction:

    +struct device;
    +

so I would really prefer to speed up recompiles and just generally try
to avoid horrible header file inclusion by doing the same thing in
<linux/device.h>, adding just that

    struct dev_pin_info;

declaration, and removing the <linux/pinctrl/devinfo.h> include.

Hmm?

I also wonder if there are any automated tools that try to find these
kinds of crazy things. I suspect a lot of our build times is the poor
compiler just reading and parsing header files over and over again,
and a lot of them are probably not needed.

A year ago, Ingo did patches limit some of the header file issues for
the core headers (<linux/sched.h> in particular). Maybe he had
tooling? Ingo?

                  Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ