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]
Message-Id: <200904210305.03933.vda.linux@googlemail.com>
Date:	Tue, 21 Apr 2009 03:05:03 +0200
From:	Denys Vlasenko <vda.linux@...glemail.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Tim Abbott <tabbott@....edu>,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Anders Kaseorg <andersk@....edu>,
	Waseem Daher <wdaher@....edu>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Andi Kleen <andi@...stfloor.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Jeff Arnold <jbarnold@....edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jon Masters <jonathan@...masters.org>
Subject: Re: [PATCH v2 0/4] Add support for compiling with -ffunction-sections -fdata-sections

On Tuesday 21 April 2009 01:40, Linus Torvalds wrote:
> Quite frankly, every time I see something like this, I shudder.
> 
> Why?
> 
> The bugs in the toolchains tend to be infinite and _really_ annoying. 

Most bugs are annoying. :)

> We'll end up with everything from "gcc-xyz cannot handle it" to 
> "binutils-abc which was pre-released by RH/Ubuntu/SUSE will SIGSEGV". 
> 
> And those are the _good_ cases. The bad cases are just silently 
> miscompiled/linked stuff under certain circumstances.
> 
> In other words, I'm not going to merge it without a _lot_ of people 
> pushing me on it with nice numbers etc. Because I absolutely hate the 
> tools issues that I'm convinced will happen the moment I merge it.

In some cases, section garbage collection discards nearly 10% of dead
code/data from kernel image. Actually, every time I add it to
a software project, I see quite an amount of dead code/data
eliminated. Even sadistic manual splitting of every function
and data object into its own .o file doesn't match it.

I can put it another way: let machine do what it does better,
and faster, than humans ever can:

I was pushing a patch for aic7xxx driver which eliminated ~150k
of dead code. It took a lot of time to eventually make it reach
mainline kernel. On and off, it took years.

With section garbage collection, that patch would not be even needed,
as gcc+ld would automagically detect that that code is dead.
--
vda
--
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