All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Roland McGrath <roland@redhat.com>, Helge Deller <deller@gmx.de>,
	"linux-parisc" <linux-parisc@vger.kernel.org>,
	"linux-kernel" <linux-kernel@vger.kernel.org>
Subject: Re: kernel segv with 2.6.31-rc6 ?
Date: Tue, 25 Aug 2009 17:29:32 +0930	[thread overview]
Message-ID: <200908251729.32855.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1250645916.18426.12.camel@mulgrave.site>

On Wed, 19 Aug 2009 11:08:36 am James Bottomley wrote:
> On Tue, 2009-08-18 at 18:31 -0700, Roland McGrath wrote:
> > > Actually, I think we do; the module loader is a runtime linker, after
> > > all.  [...]
> > 
> > Indeed you do.  I've just read some of the parts of ld that normally
> > address this issue for HPPA.  They don't run for ld -r.  So this is just
> > another fine example of the lunacy of the ET_REL .ko madness that would be
> > naturally avoided by a sensible tweaked ET_DYN scheme.
> 
> Using ET_DYN would have made our life easier when trying to code the
> kernel module loader as well.  The basic problem is, of course, that
> this is simple on an x86, so it didn't matter that much for the initial
> implementation.  It just becomes less simple on anything else.

Actually, x86 was one of the archs which fucked us.  Richard Henderson and
I *had* this, but ld -shared without -fPIC helpfully tells you "you're doing
it wrong" on x86-64.

There were other issues, ISTR MIPS was a showstopper.  Google finds the
following summary I wrote when this stuff was fresher:

http://lkml.org/lkml/2003/1/12/271 :

	While ET_DYN modules are a reasonably serious win for ia64 (and
	probably hppa) (ie. -300 lines or so), they're a minor win for alpha
	and ppc64 (-100 lines or so), and no real change for arm, i386, ppc,
	sparc, and sparc64.  It's a lose for x86_64 (toolchain fixes, unless
	they want to use -fPIC for modules), mips and mips64 (major toolchain
	fixes, unless they want to use -fPIC for modules and stop using r28
	for current inside modules).

> >   But that battle was
> > lost way, way back in the long, long ago, so long ago they were probably
> > even still making HPPA machines then.

This isn't quite true; userspace should handle ET_DYN fine (at least, it
was supposed to).

So you could change any arch to use that, but it's a fair refactor if we leave
some archs behind.

If anyone's really interested, I can dig out the bits I have...

> So that leaves us stuck with the current implementation and still
> needing a solution for the duplicate section names?

If this is not a "don't do that" bug, we could try hacking around it in
parisc's module_arch_frob_sections?

Rusty.

  parent reply	other threads:[~2009-08-25  7:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 21:31 kernel segv with 2.6.31-rc6 ? Helge Deller
2009-08-17 22:04 ` James Bottomley
2009-08-17 22:49 ` James Bottomley
2009-08-17 23:54   ` Roland McGrath
2009-08-18  3:18   ` Rusty Russell
2009-08-18  3:55     ` James Bottomley
2009-08-18  5:06     ` Roland McGrath
2009-08-19  0:09       ` James Bottomley
2009-08-19  0:14         ` Roland McGrath
2009-08-19  0:54           ` James Bottomley
2009-08-19  1:31             ` Roland McGrath
2009-08-19  1:38               ` James Bottomley
2009-08-19 18:10                 ` Roland McGrath
2009-08-25  7:59                 ` Rusty Russell [this message]
2009-08-25 19:24                   ` Roland McGrath
2009-08-26 12:20                     ` Rusty Russell
2009-08-26 17:54                       ` Roland McGrath
2009-08-20 11:51         ` Helge Deller
2009-08-20 11:51           ` Helge Deller
2009-08-20 12:25           ` Helge Deller
2009-08-20 12:25             ` Helge Deller
2009-08-20 18:55             ` John David Anglin
2009-08-20 21:45               ` Helge Deller
2009-08-20 21:50                 ` James Bottomley
2009-08-20 22:07                   ` Roland McGrath
2009-08-20 23:01                   ` John David Anglin
2009-08-20 23:23                     ` Roland McGrath
2009-08-21  0:03                       ` John David Anglin
2009-08-25 21:49             ` Mike Frysinger
2009-08-25  7:37         ` Rusty Russell
2009-11-27 22:11           ` Helge Deller
2009-11-30  4:41             ` Roland McGrath
2009-08-20 11:58   ` Helge Deller

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=200908251729.32855.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=roland@redhat.com \
    /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.