All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Roland Dreier <rdreier@cisco.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	Helge Deller <deller@gmx.de>,
	Rusty Russell <rusty@rustcorp.com.au>,
	linux-parisc <linux-parisc@vger.kernel.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Kyle McMartin <kyle@mcmartin.ca>,
	Randolph Chung <randolph@tausq.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	John David Anglin <dave@hiauly1.hia.nrc.ca>
Subject: Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4)
Date: Thu, 1 Jan 2009 15:24:01 +0100	[thread overview]
Message-ID: <20090101142401.GA25690@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.00.0812311318420.5086@localhost.localdomain>


* Linus Torvalds <torvalds@linux-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

  parent reply	other threads:[~2009-01-01 14:24 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 20:34 [PATCH] parisc: fix module loading failure of large kernel modules (take 2) Helge Deller
2008-12-29 20:34 ` Helge Deller
2008-12-29 20:43 ` [PATCH 1/2] module.c: fix module loading failure of large " Helge Deller
2008-12-29 20:43   ` Helge Deller
     [not found]   ` <20081230180724.GA15235@bombadil.infradead.org>
2008-12-30 18:10     ` Kyle McMartin
2008-12-30 18:18       ` Helge Deller
2008-12-30 19:42         ` [PATCH 1/2] module.c: fix module loading failure of large modules (take 3) Helge Deller
2008-12-29 20:45 ` [PATCH 2/2] parisc: fix module loading failure of large modules (take 2) Helge Deller
2008-12-29 20:45   ` Helge Deller
2008-12-30 19:55   ` [PATCH 2/2] parisc: fix module loading failure of large modules (take 3) Helge Deller
2008-12-30 19:55     ` Helge Deller
2008-12-30 22:45 ` [PATCH] parisc: fix module loading failure of large kernel modules (take 2) Rusty Russell
2008-12-30 23:02   ` Helge Deller
2008-12-31  4:08     ` Rusty Russell
2008-12-31 11:31   ` [PATCH] parisc: fix module loading failure of large kernel modules (take 4) Helge Deller
2008-12-31 11:36     ` [PATCH 2/2] parisc: fix module loading failure of large modules Helge Deller
2008-12-31 13:32     ` [PATCH] parisc: fix module loading failure of large kernel modules (take 4) Rusty Russell
2008-12-31 14:13       ` Helge Deller
2009-01-01  0:52         ` Rusty Russell
2009-01-01 12:02           ` Helge Deller
2008-12-31 17:29     ` Linus Torvalds
2008-12-31 17:36       ` Roland Dreier
2008-12-31 17:47         ` Linus Torvalds
2008-12-31 18:02           ` Linus Torvalds
2008-12-31 18:11           ` Sam Ravnborg
2009-01-02 11:31             ` Ingo Molnar
2008-12-31 18:54           ` Andrew Morton
2008-12-31 21:22             ` Linus Torvalds
2008-12-31 22:14               ` David Miller
2009-01-02 11:55                 ` [PATCH] kbuild: Disallow GCC 4.1.0 / 4.1.1 Ingo Molnar
2009-01-02 13:43                   ` Bartlomiej Zolnierkiewicz
2009-01-02 15:21                     ` [PATCH] kbuild: Remove gcc 4.1.0 quirk from init/main.c Ingo Molnar
2009-01-02 15:21                       ` Ingo Molnar
2009-01-02 18:05                       ` Sam Ravnborg
2009-01-02 16:49                   ` [PATCH] kbuild: Disallow GCC 4.1.0 / 4.1.1 Linus Torvalds
2009-01-02 17:38                     ` Linus Torvalds
2009-01-02 17:46                       ` Ingo Molnar
2009-01-02 17:54                         ` [PATCH] Disallow gcc versions 3.{0,1} Ingo Molnar
2009-01-02 17:58                         ` [PATCH] kbuild: Disallow GCC 4.1.0 / 4.1.1 Linus Torvalds
2009-01-02 18:01                           ` Ingo Molnar
2009-01-02 18:05                             ` Linus Torvalds
2009-01-02 18:08                               ` Linus Torvalds
2009-01-02 19:54                               ` Willy Tarreau
2009-01-02 20:18                                 ` Linus Torvalds
2009-01-02 17:57                       ` Sam Ravnborg
2009-01-02 18:04                         ` Linus Torvalds
2009-01-02 18:27                           ` Sam Ravnborg
2009-01-02 18:28                             ` Randy Dunlap
2009-01-02 18:51                           ` Al Viro
2009-01-02 19:14                             ` Andi Kleen
2009-01-02 22:52                               ` Al Viro
2009-01-03 14:03                           ` Krzysztof Halasa
2009-01-02 18:22                         ` Ingo Molnar
2009-01-02 18:29                           ` Sam Ravnborg
2009-01-02 18:33                             ` Ingo Molnar
2009-01-02 19:05                               ` Detlef Riekenberg
2009-01-02 22:27                         ` Benjamin Herrenschmidt
2009-01-02 22:37                           ` Sam Ravnborg
2009-01-02 17:44                     ` Ingo Molnar
2009-01-01 14:24               ` Ingo Molnar [this message]
2009-01-01 16:37                 ` [PATCH] parisc: fix module loading failure of large kernel modules (take 4) Andrew Morton
2008-12-31 17:39       ` Helge Deller
2008-12-31 18:24       ` James Bottomley
2008-12-31 22:16       ` Rusty Russell
2009-01-01  7:12       ` Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090101142401.GA25690@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=deller@gmx.de \
    --cc=ian.campbell@citrix.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=randolph@tausq.org \
    --cc=rdreier@cisco.com \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.