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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Feb 2018 08:59:42 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: [PATCH/RFC] headers: drop 2 #included headers from
 <linux/interrupt.h>


* Randy Dunlap <rdunlap@...radead.org> wrote:

> Does anyone know or see why <linux/interrupt.h> needs <linux/linkage.h> or
> <linux/preempt.h>?  There are no direct uses in <linux/interrupt.h> AFAICT.

These are likely historical, plus it's a classic 'tragedy of the commons' 
scenario: it's easy to take away from the "public good" of "clean header 
dependencies" and very hard to add to it:

 - it's very easy to add a new #include line

 - it's very hard to remove one, not just due to the 2^10000 complex Kconfig
   space, but due to 99% of the developers not testing cross-arch builds
   (and we don't want to require them to do it)

 - the cost of getting the removal wrong is high (the build breaks for many 
   people who will be unhappy at the person removing the header), while the 
   benefit of the removal is low in isolation

Then apply this dynamic for more than 20 years and we get a spaghetti:

 triton:~/tip> grep -c '#include <' include/linux/*.h | sort -n -t: -k +2  | tail -20

 include/linux/device.h:15
 include/linux/ide.h:16
 include/linux/module.h:16
 include/linux/acpi.h:17
 include/linux/filter.h:17
 include/linux/init_task.h:17
 include/linux/mmzone.h:17
 include/linux/cgroup.h:18
 include/linux/nfs_fs.h:18
 include/linux/sched.h:18
 include/linux/irq.h:19
 include/linux/pci.h:19
 include/linux/perf_event.h:23
 include/linux/blkdev.h:25
 include/linux/kvm_host.h:26
 include/linux/mm.h:26
 include/linux/netdevice.h:26
 include/linux/skbuff.h:26
 include/linux/isdn.h:27
 include/linux/fs.h:39

Plus there's collateral damage as well: there's countless primitives that were 
forced into the CPP macro space because the header dependencies were too hard. 
Such code is not just harder to read and maintain, it's more fragile to macro 
substitution bugs and it's less type safe as well.

I'd argue that due to the basic human dynamics here this calls for tooling help.

In the meanwhile I've applied your patch to tip:core/headers and will do full 
build testing + fixing, should anything break.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ