mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Alexander Holler <holler@ahsoftware.de>
Cc: Nicolas Pitre <nico@fluxnic.net>, linux-kernel@vger.kernel.org
Subject: Re: ARM: relocation out of range (when loading a module)
Date: Tue, 11 Jan 2011 15:57:31 +0000	[thread overview]
Message-ID: <20110111155731.GG11039@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4D2C7484.3050309@ahsoftware.de>

On Tue, Jan 11, 2011 at 04:17:24PM +0100, Alexander Holler wrote:
> Thinking a bit more about that (for me unexcpected) "relocation out of  
> range" error when loading a module, I'm curious if there could be other  
> conditions which would lead to that error. Especially conditions which  
> could be generated by the userspace or remote from some network.

It's purely about the relative position of the kernel text to the module
text.  Nothing outside of the compilation of the kernel will affect it.

It's all to do with the branch instructions in modules having a limited
range.

We generally place the kernel such that it starts 32K into the kernel's
system RAM mapping.  We place modules immediately below this mapping.
The initramfs image sits in the kernel body in the startup data, which
sits between the startup text at the beginning of the kernel, and the
main kernel text which follows.

We _could_ rearrange the placement of these sections within the kernel
image to eliminate the problem, but it's not a simple matter to just
rearrange them - there's various assumptions made about the current
arrangement.  There's also considerations over whether that would cause
additional memory to be wasted due to the alignment requirements of the
various sections, and whether it would degrade the ability to get
DMA-able memory on certain platforms.

  reply	other threads:[~2011-01-11 15:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 18:16 Alexander Holler
2011-01-10 22:26 ` Nicolas Pitre
2011-01-11  6:34   ` Alexander Holler
2011-01-11 15:17     ` Alexander Holler
2011-01-11 15:57       ` Russell King - ARM Linux [this message]
2011-01-11 16:02       ` Nicolas Pitre
2011-01-11 15:46     ` Rabin Vincent
2011-01-11 15:59       ` Russell King - ARM Linux
2011-01-12  3:00         ` Alexander Holler
2011-01-12 16:05           ` Dave Martin
2011-01-12 16:23             ` Russell King - ARM Linux
2011-01-12 18:28             ` Nicolas Pitre
2011-01-12 18:42               ` Russell King - ARM Linux
2011-01-12 18:55                 ` Nicolas Pitre
2011-01-25  8:44                   ` Sachin Verma
2011-01-25 13:23                     ` Catalin Marinas
2011-01-27  5:43                     ` Nicolas Pitre
2011-02-10 15:43                       ` Russell King - ARM Linux
2011-02-10 19:41                         ` Nicolas Pitre
2011-02-11  9:31                           ` Dave Martin
2011-02-11  9:38                             ` Russell King - ARM Linux
2011-02-11  9:45                               ` Dave Martin
2011-02-11 13:55                                 ` Nicolas Pitre
2011-02-11 13:51                             ` Nicolas Pitre
2011-02-11 14:25                               ` Dave Martin
2011-02-11 14:42                                 ` Russell King - ARM Linux
2011-02-12 19:52                                   ` Nicolas Pitre
2011-01-13  5:50                 ` Alexander Holler
2011-01-13 10:04                   ` Russell King - ARM Linux
2011-01-13 14:36                     ` Alexander Holler
2011-01-12 16:25         ` Matthieu CASTET
2011-01-12 16:38           ` Russell King - ARM Linux
2011-01-11 16:01     ` Nicolas Pitre

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=20110111155731.GG11039@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=holler@ahsoftware.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®