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: <20090101142401.GA25690@elte.hu>
Date:	Thu, 1 Jan 2009 15:24:01 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Roland Dreier <rdreier@...co.com>,
	Ian Campbell <ian.campbell@...rix.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
	Helge Deller <deller@....de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	linux-parisc <linux-parisc@...r.kernel.org>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Kyle McMartin <kyle@...artin.ca>,
	Randolph Chung <randolph@...sq.org>,
	Sam Ravnborg <sam@...nborg.org>,
	John David Anglin <dave@...uly1.hia.nrc.ca>
Subject: Re: [PATCH] parisc: fix module loading failure of large kernel
	modules (take 4)


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> 
> 
> On Wed, 31 Dec 2008, Andrew Morton wrote:
> > 
> > Adrian claimed that it was gcc-4.1.0 and 4.1.1 only.  He proposed
> > banning them: http://lkml.org/lkml/2008/8/5/444
> 
> If it really is just those releases, then yes, considering the number of 
> cases we apparently have, and considering how ugly it is in some cases 
> to move the weak function anywhere else, maybe banning those versions is 
> the proper thing to do.
> 
> It probably won't hurt very many people - yeah, some people will be 
> forced to upgrade, but I have this memory of early 4.1 having had other 
> bugs anyway, so it's probably a good idea.

That would be _really_ nice to do IMHO: in many cases putting the __weak 
definition into same-file scope with a call site is a natural approach. I 
think that's how we ended up having so many instances of that bug. When 
you use __weak as a 'default implementation' for some function, then it's 
very natural to put it into the same file that also uses it.

It goes into separate, inactive scope only in a few special cases: such as 
when it's some library function that can be overriden by the architecture. 
But if it's some non-libray kernel code then the usage site is close to 
the definition site.

If you look at most of the __weak fixes they IMO actually turned clean 
code into less clean code: they detached some natural clustering of 
definition and callsite.

And __weak is very elegant IMO, it can avoid a lot of #ifdefs and can be 
used to self-document architecture interfaces - so it would be nice to 
make it always work, regardless of the callsite's scope.

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