Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Frequent kernel panic with compat_linux module



On Wed, Dec 10, 2008 at 12:20:49AM +0000, David Laight wrote:
> On Tue, Dec 09, 2008 at 01:57:11PM +0100, Nicolas Joly wrote:
> > This GDB was configured as "x86_64--netbsd"...
> > (gdb) l *(linux_syscall+0x92)
> > 0xca42 is in linux_syscall (/local/src/NetBSD/src/sys/sys/syscallvar.h:62).
> > 57      {
> > 58              int error;
> > 59      
> > 60              l->l_sysent = sy;
> > 61              error = (*sy->sy_call)(l, uap, rval);
> > 62              l->l_sysent = NULL;
> > 63      
> > 64              return error;
> > 65      }
> > 66      
> 
>  That function doesn't look big enough to contain
> linux_syscall+0x92.  I suspect the fault may be in a static function
> that is next in the object file.

This is from sy_call(), which is defined as static inline, and indeed
called from linux_syscall().

> You might need disassemble the code in order to identify it.
> looking at the output of 'objdump -d netbsd' might be easier than using gdb!

gdb output looks correct, `objdump -dS compat_linux.kmod' seems to agree.

000000000000c9b0 <linux_syscall>:
static void
linux_syscall(struct trapframe *frame)
{
    c9b0:       48 89 5c 24 d8          mov    %rbx,0xffffffffffffffd8(%rsp)
    c9b5:       48 89 6c 24 e0          mov    %rbp,0xffffffffffffffe0(%rsp)
[...]
        rval[0] = 0;
    ca1e:       48 c7 04 24 00 00 00    movq   $0x0,(%rsp)
    ca25:       00 
        rval[1] = 0;
    ca26:       48 c7 44 24 08 00 00    movq   $0x0,0x8(%rsp)
    ca2d:       00 00 
{
        int error;

        l->l_sysent = sy;
        error = (*sy->sy_call)(l, uap, rval);
    ca2f:       48 89 e2                mov    %rsp,%rdx
    ca32:       48 89 ab 08 03 00 00    mov    %rbp,0x308(%rbx)
    ca39:       4c 89 e6                mov    %r12,%rsi
    ca3c:       48 89 df                mov    %rbx,%rdi
    ca3f:       ff 55 08                callq  *0x8(%rbp)
        l->l_sysent = NULL;
    ca42:       48 c7 83 08 03 00 00    movq   $0x0,0x308(%rbx)         <----
    ca49:       00 00 00 00 
    ca4d:       89 c2                   mov    %eax,%edx
        error = sy_call(callp, l, args, rval);
out:
[...]

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index