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:	Tue, 17 Oct 2006 09:12:50 -0600
From:	Ray Lehtiniemi <rayl@...l.com>
To:	Al Viro <viro@....linux.org.uk>
Cc:	linux-kernel@...r.kernel.org
Subject: Bogus deps checking (was Re: [RFC] typechecking for
 get_unaligned/put_unaligned)

On Monday 16 October 2006 22:37, Al Viro wrote:
> FWIW, that reminds me - I ought to resurrect the
> patchset killing bogus dependencies; I modified sparse to collect stats
> on how many times each #include actually pulls a header during build,
> added those to data on dependencies (from .cmd.*) and got interesting
> results.

are these modifications publically available?  i would be interested to see 
them. i've been grovelling over the header files with perl...


> There are several #includes with very high impact; the worst happens
> to be module.h -> sched.h, followed by several includes of fs.h.  These
> turned out to be easy to kill (i.e. few places actually needed compensatory
> #include added) and that had seriously cut down on total dependencies.
> The patches will need to be redone due to bitrot, but they are not
> hard to reproduce.  The really interesting observation is that such
> high-impact includes exist and can be found by this technics...

i noticed another potential source of unneccessary dependencies: 
<linux/prefetch.h> includes <asm/processor.h> for a total of ~49 
dependencies.  it appears that the prefetch() concept could be moved into a 
separate <asm/prefetch.h> file with much smaller dependency footprint, for a 
pretty hefty reduction in total dependencies throughout the system.

another potential win:  a good chunk of <linux/kernel.h> (which has ~24 
dependencies) actually has nothing to do with the kernel per se.  i'm 
thinking of basic C language idioms (container_of(), typecheck(), etc) and 
constants (INT_MAX).  a fair number of files seem to include <linux/kernel.h> 
just for these items.  moving that stuff into a separate file (<linux/c.h>?) 
could eliminate 20 or more bogus deps from many locations.


ray
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ