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: <alpine.LFD.1.10.0804271150050.3119@woody.linux-foundation.org>
Date:	Sun, 27 Apr 2008 11:57:42 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Adrian Bunk <bunk@...nel.org>
cc:	Sam Ravnborg <sam@...nborg.org>,
	linux arch <linux-arch@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH] prepare kconfig inline optimization for all
 architectures



On Sun, 27 Apr 2008, Adrian Bunk wrote:

> On Sun, Apr 27, 2008 at 11:11:27AM -0700, Linus Torvalds wrote:
> > 
> > For example, what's wrong with having "inline" on functions in .c files if 
> > the author thinks they are small enough? He's likely right. Considering 
> > past behaviour, he's quite often more right than the compiler.
> >...
> 
> Ingo's commit in your tree just broke this assumption.

Note that our problem is too much inlining, not too little.

I'm actually happier with gcc not deciding to inline (despite having an 
"inline") than I am with gcc deciding to inline (in violation of _not_ 
having an "inline").

So I don't disagree with Ingo's commit per se.

The only problem with not inlining is a historical one: exactly because 
gcc _used_ to always do what people asked for, Linux has historically 
treated "inline" as a "force_inline". And I was very unhappy when gcc 
changed that, just because it broke historically good code.

In many ways, it might have been better if we had a "__may_inline" thing 
to tell the compiler "you can inline this if you think it's worth it"). 
Both gcc (long ago) and Ingo (now) decided to just make plain "inline" 
mean that, but with a pretty strong bias. It was wrong for gcc to do so, 
imho, and it may have been wrong for this OPTIMIZE_INLINE thing too.

			Linus
--
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