From: Helge Deller <deller@gmx.de>
To: linux-parisc@vger.kernel.org,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Kyle McMartin <kyle@mcmartin.ca>,
Randolph Chung <randolph@tausq.org>,
Moritz Muehlenhoff <jmm@inutil.org>,
Linus <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Helge Deller <deller@gmx.de>
Subject: [PATCH] parisc: fix module loading failure of large kernel modules
Date: Mon, 29 Dec 2008 15:07:26 +0100 [thread overview]
Message-ID: <4958D99E.4010201@gmx.de> (raw)
The parisc port (esp. the 32bit kernel) currently lacks the ability to
load large kernel modules like xfs or ipv6. This is a long outstanding
bug and has already been reported a few times, e.g.:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350482,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=401439,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508489
The symptom is like this:
# modprobe xfs
FATAL: Error inserting xfs
(/lib/modules/2.6.26-1-parisc/kernel/fs/xfs/xfs.ko): Invalid module
format
In dmesg:
module xfs relocation of symbol xfs_btree_read_bufs is out of range
(0x3ffefffe in 17 bits)
The reason for the failure is, that the architecture only provides the
R_PARISC_PCREL17F (for 32bit kernels) and R_PARISC_PCREL22F (for PA2.0
and 64bit kernels) relocations, which sometimes can't reach the target
address of the stub entry if the kernel module is too large. Currently
parisc (like other architectures) creates one big PLT section for all
stubs at the beginning of the init and core sections.
The following two patches changes the parisc module loader to put stubs
in between the code sections instead, so that the distance to the stubs
more easily fits into the available 17/22 bits.
The first patch touches the generic module loader and adds a call to the
new module_additional_section_size() function to get_offset() if
CONFIG_ARCH_WANTS_STUBS_BEHIND_SECTIONS is defined. On parisc this
function returns the additional bytes for the stub area of a given section.
The second patch implements the parisc-specific changes.
Tested with 32- and 64bit parisc kernels.
Helge
next reply other threads:[~2008-12-29 14:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 14:07 Helge Deller [this message]
2008-12-29 14:09 ` [PATCH 1/2] module.c: fix module loading failure of large modules Helge Deller
2008-12-29 14:10 ` [PATCH 2/2] parisc: " Helge Deller
2008-12-29 15:46 ` Sam Ravnborg
2008-12-29 16:09 ` Helge Deller
2008-12-29 16:14 ` John David Anglin
2008-12-29 17:56 ` 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=4958D99E.4010201@gmx.de \
--to=deller@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=jmm@inutil.org \
--cc=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=randolph@tausq.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox