Hi
Am newbie to UML. I have 2.6.24 kernel, which I've built from source. I've also built UML from 2.6.24 in different directory. I could load UML from my host OS and mount hostfs without any issue. This is how I built UML from source,
1. untar linux source
2. make defconfig ARCH=um
3. make menuconfig ARCH=um
i've set only option 'host file system access', saved the config and did
4. make linux ARCH=um
Coming to my problem. I'm developing a kernel module and I hate to reboot my host OS everytime there is any issue in module. I'm hoping UML would help me here. When I load my module in host OS, it loads/unloads without any issue. However, when I try to load this in UML I get:
1. vermagic: "blah blah" should be "blah blah x yz". Invalid format
I circumvented above issue by commenting out this vermagic check in kernel/module.c and rebuilding UML. Now it gets past above error but I'm getting a kernel panic in mm/slab.c. here is the trace:
I added this printk() in mm/slab.c to print the name, size of 'prot' struct and they seem to be NULL and 0. THe same code works without any issue while loading in host OS.
==========
proto_register: name [] size 0
kmem_cache_create: Early error in slab
BUG: failure at mm/slab.c:2166/kmem_cache_create()!
Kernel panic - not syncing: BUG!
EIP: 0073:[<ffffe410>] CPU: 0 Not tainted ESP: 007b:bf8e97c0 EFLAGS: 00000246
Not tainted
EAX: ffffffda EBX: 40153008 ECX: 000339d7 EDX: 0804a008
ESI: 00000000 EDI: 00000000 EBP: bf8e9828 DS: 007b ES: 007b
0bdc3dc0: [<08069c54>] show_regs+0xb4/0xb9
0bdc3dec: [<08058c46>] panic_exit+0x25/0x3f
0bdc3e00: [<08085084>] notifier_call_chain+0x21/0x46
0bdc3e20: [<0808511f>] __atomic_notifier_call_chain+0x17/0x19
0bdc3e3c: [<08085136>] atomic_notifier_call_chain+0x15/0x17
0bdc3e58: [<080704be>] panic+0x52/0xdd
0bdc3e78: [<080a87c0>] kmem_cache_create+0x1a1/0x3e0
0bdc3ec0: [<08145894>] proto_register+0x47/0x1db
0bdc3efc: [<0c838012>] mymod_init+0x12/0x6a [mymod]
0bdc3f14: [<08058fb7>] handle_syscall+0x83/0x9c
0bdc3f60: [<08066b72>] handle_trap+0xd8/0xe1
0bdc3f7c: [<08066fe2>] userspace+0x1ac/0x249
0bdc3fdc: [<08056a36>] fork_handler+0x74/0x7c
0bdc3ffc: [<00000000>] obsolete_checksetup+0xf7fb7000/0x88
Segmentation fault
[root@... uml]#
I must be doing something very basic.
Also the output of "lsmod" is empty inside UML.
Should (or Can) I recompile my module inside UML?
thanks for your help.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ