Hello everyone!
 
I have a problem with debugging a kernel module with UML. The module works OK 
on a regular machine, but when i try to debug it whit UML it seg faults with 
the following trace:
 
Program received signal SIGSEGV, Segmentation fault.
0x080593b6 in do_buffer_op (jmpbuf=0x9da8e08, arg_ptr=0x9da8e24)
    at arch/um/kernel/skas/uaccess.c:79
79              current->thread.fault_catcher = jmpbuf;
(gdb) bt
#0  0x080593b6 in do_buffer_op (jmpbuf=0x9da8e08, arg_ptr=0x9da8e24)
    at arch/um/kernel/skas/uaccess.c:79
#1  0x08065c15 in setjmp_wrapper (proc=0x8059344 <do_buffer_op>) at 
arch/um/os-Linux/util.c:100
#2  0x08059499 in buffer_op (addr=134533192, len=19, is_write=1,
    op=0x805957a <copy_chunk_to_user>, arg=0x9da8e94) at 
arch/um/kernel/skas/uaccess.c:122
#3  0x08059608 in copy_to_user (to=0x804d048, from=0x9da8ea8, n=0)
    at arch/um/kernel/skas/uaccess.c:167
#4  0x0a8414cd in hsm_device_read (filp=0x9468090, buffer=0x804d048 
"\b▒E▒S?\b\b▒A\003",
    length=5000, offset=0x9da9efc) at 
/home/peterf/hsl/hsmfsfilter/trunk/linux/hsm_chrdev.c:293
#5  0x080ac695 in vfs_read (file=0x9468090, buf=0x804d048 "\b▒E▒S?\b\b▒A\003", 
count=5000,
    pos=0x9da9efc) at fs/read_write.c:273
#6  0x080ac990 in sys_read (fd=3, buf=0x804d048 "\b▒E▒S?\b\b▒A\003", count=5000)
    at fs/read_write.c:366
#7  0x0805923b in handle_syscall (r=0x9c87a24) at 
arch/um/kernel/skas/syscall.c:35
#8  0x080670e2 in handle_trap (pid=6073, regs=0x9c87a24, local_using_sysemu=2)
    at arch/um/os-Linux/skas/process.c:168
#9  0x0806754f in userspace (regs=0x9c87a24) at 
arch/um/os-Linux/skas/process.c:341
#10 0x08056ce6 in fork_handler () at arch/um/kernel/process.c:183
#11 0xa56b6b6b in ?? ()

I've tried setting "handle SIGSEGV nostop noprint pass" but then it just hangs 
the UML. Renaming the /lib/tls on the host and guest made no difference.

As I mentioned, the module works ok on regular machine. I'm new to UML and 
linux kernel, and I'm really out of ideas now. The UML was build with linux 
sources for Ubuntu 8.04.1 (JeOS) downloaded with "apt-get install 
linux-source", with default UML kernel configuration + ext2/3 extended 
attributes support. The kernel version is 2.6.24.3.

Any help would be appreciated.

Regards,

Peter

-------------------------------------------------------------------------
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=/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to