From: juergen.kadidlo@exasol.com
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] kernel module support broken on x86-64?
Date: Wed, 06 Aug 2008 14:25:24 +0200 [thread overview]
Message-ID: <48999834.1000707@exasol.com> (raw)
In-Reply-To: <48998FBD.6080705@panasas.com>
[-- Attachment #1.1: Type: text/plain, Size: 5600 bytes --]
Boaz Harrosh wrote:
>juergen.kadidlo@exasol.com wrote:
>
>
>>Boaz Harrosh wrote:
>>
>>
>>>juergen.kadidlo@exasol.com wrote:
>>>
>>>
>>>
>>>>Boaz Harrosh wrote:
>>>>
>>>>
>>>>
>>>>>juergen.kadidlo@exasol.com wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Hi!
>>>>>>
>>>>>> I've compiled an UML kernel based on 2.6.25 but loading kernel modules
>>>>>>seems to be broken. No matter which module I try to load the output
>>>>>>looks similar to this:
>>>>>>
>>>>>> overflow in relocation type 11 val 80836d41
>>>>>>'loop' likely not compiled with -mcmodel=kernel
>>>>>>
>>>>>>After searching for a while I found some threads from 2006 discussing
>>>>>>this issue, e.g.:
>>>>>>http://www.mail-archive.com/user-mode-linux-devel@lists.sourceforge.net/msg03693.html
>>>>>>and
>>>>>>http://marc.info/?l=user-mode-linux-devel&m=115125101012707&w=2
>>>>>>
>>>>>>As Andi Kleen has mentioned in a mail from the first thread, simply
>>>>>>appending "-mcmodel=kernel" to the KBUILD_CFLAGS does not work (I tried
>>>>>>it anyway and can confirm his statement ;)
>>>>>>
>>>>>>Since I could not find any solution I've decided to write this mail and
>>>>>>ask about the current state of this issue and of course for a solution!
>>>>>>I simply don't want to believe that there is no loadable module support
>>>>>>for UML in 2008...
>>>>>>
>>>>>>Regards
>>>>>>JK
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>Every thing is fine down here. What host Kernel-gcc-glibc / uml-gcc-glibc
>>>>>are you using?
>>>>>
>>>>>I'm using out-of-tree modules with uml for every kernel since 2.6.19.
>>>>>I have both Host and UML as x86_64 on FC7 with gcc 4.1.2
>>>>>
>>>>>Boaz
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>I'm glad to here that the bug has been fixed. Anyway, it does not work
>>>>with my configuration:
>>>>
>>>> - CentOS 5.1 as host system and UML root fs
>>>> - Kernel 2.6.25.4 (vanilla, but config taken from the CentOS kernel)
>>>> - GCC 4.1.2
>>>> - GLIBC 2.5
>>>>
>>>>Regards
>>>>JK
>>>>
>>>>
>>>>
>>>>
>>>I used to run with red-hat 4.5 so this should work.
>>>64 bit, right?
>>>
>>>From passed experience I've seen that UML will only
>>>work if I first do "make ARCH=um defconfig" and then
>>>manually enable any needed options with make xconfig.
>>>other wise it breaks in all kind of ways. Even doing
>>>a make oldconfig on a good uml config file from older
>>>kernel will not work. Try to do defconfig and see if
>>>it loads at all.
>>>
>>>How do you compile and run the out-of-tree module
>>>or is it one of the built in modules?
>>>
>>>Boaz
>>>
>>>
>>>
>>>
>>I tried what you've suggested and did the following:
>>- make mrproper
>>- make defconfig ARCH=um
>>- make linux ARCH=um
>>- make modules ARCH=um
>>- make modules_install INSTALL_MOD_PATH=/path/to/mounted/uml_root_fs ARCH=um
>>
>>It did not work (same result).
>>
>>After that, I copied the kernel source to the uml-root-fs, started the
>>UML and did a 'make clean' and 'make modules ARCH=um' inside the running
>>UML, followed by a 'make modules_install'. Again, it did not work.
>>
>>After that, I've extracted the kernel source again (completely vanilla)
>>and restarted at 'make defconfig'. Same result.
>>No module is loadable. They all have 'invalid fomrat' an the usage of
>>the '-mcmodel=kernel' flag is suggested.
>>
>>BTW : with the same sources (and the same commands as listed above) I've
>>successfully built a fully working 32 bit UML kernel!
>>
>>I've also tried kernel 2.6.24.7 with identical results.
>>
>>Last but not least, I've tried the same with a fresh download of the
>>2.6.26 kernel. Unfortunately, this time there was another problem: the
>>kernel exits with a panic on startup (tried to build it twice with the
>>same result). According to the stack-trace, the panic happens somewhere
>>inside "get_page_from_free_list()"...
>>
>>I'm really running out of ideas right now, does anyone have some
>>suggestions?
>>
>>Regards
>>JK
>>
>>
>>
>
>It all works down here. Just a long shot you have installed uml_utilities
>on the host ...
>
>
They are installed.
>I run the uml from the root of the source tree like this:
>.../.build_um/vmlinux ubd0=/usr0/var/local/um/Fedora7-AMD64-root_fs eth0=tuntap,,,192.168.0.117 mem=256M
>(The .build_um/ is because I use KBUILD_OUTPUT=.build_um so I can compile
>multiple targets from same source tree)
>
>Maybe there is some package missing from the Linux image you are using.
>You are using a 64bit Linux image with your 64bit kernel, yes?
>Try to compare the 32 bit image with the 64bit one. See if they have
>the same packages installed. I started with a ready made fedora7 uml
>image and never really touched it much except the occasional yum install
>of a library or two.
>
>Boaz
>
>
I already thought about the root fs being the reason for this, but I
can't imagine how a different root can affect the kernel's ability to
load modules. It should not be affected by any packages installed, isn't it?
Anyway, after taking a closer look to your starting command, I noticed
another difference: I've always been using "mem=512m" on the 64 bit
system (it's an 8 GB machine). I've tried it with "mem=256" and IT
FINALLY WORKS! All the kernels I've compiled are working correctly now,
except for the 2.6.26 which still exits with a panic on startup...
Thank you very much for your help! But I'd really like to know why it
did not work with "m= 512m". I've always thought that this would only
alter the max. available memory inside the UML. Maybe this is a bug though?
Regards
JK
[-- Attachment #1.2: Type: text/html, Size: 6539 bytes --]
[-- Attachment #2: Type: text/plain, Size: 363 bytes --]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
[-- Attachment #3: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2008-08-06 12:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 15:25 [uml-devel] kernel module support broken on x86-64? juergen.kadidlo
[not found] ` <489873E0.9030801@panasas.com>
2008-08-05 16:37 ` juergen.kadidlo
2008-08-05 16:55 ` Boaz Harrosh
2008-08-06 10:15 ` juergen.kadidlo
2008-08-06 11:49 ` Boaz Harrosh
2008-08-06 12:25 ` juergen.kadidlo [this message]
2008-08-06 14:18 ` Boaz Harrosh
[not found] ` <4899C293.7070501@panasas.com>
2008-08-07 9:02 ` juergen.kadidlo
[not found] ` <489B1C35.1030509@panasas.com>
2008-08-25 21:47 ` Jeff Dike
2008-08-05 17:28 ` Jeff Dike
2008-08-06 7:30 ` juergen.kadidlo
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=48999834.1000707@exasol.com \
--to=juergen.kadidlo@exasol.com \
--cc=bharrosh@panasas.com \
--cc=user-mode-linux-devel@lists.sourceforge.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