From: "Peter Teoh" <htmldeveloper@gmail.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5
Date: Sun, 20 Jul 2008 17:15:16 +0800 [thread overview]
Message-ID: <804dabb00807200215n32b5171do97d344f2f954c490@mail.gmail.com> (raw)
In-Reply-To: <20080718205532.GG13572@c2.user-mode-linux.org>
The problem lies in the function:
static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
{
int n, i;
long ret, offset;
unsigned long * data;
unsigned long * syscall;
int err, pid = mm_idp->u.pid;
if (proc_mm)
/* FIXME: Need to look up userspace_pid by cpu */
pid = userspace_pid[0];
multi_count++;
n = ptrace_setregs(pid, syscall_regs);
if (n < 0) {
printk(UM_KERN_ERR "Registers - \n");
for (i = 0; i < MAX_REG_NR; i++)
printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]);
panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n",
-n);
}
Where the ptrace_setregs() above returned a value less than zero.
Breakpoint 2, do_syscall_stub (mm_idp=0xfdaee9c, addr=0xfc5ce44) at
/mnt/hd0/download/linux-2.6-latest/arch/um/os-Linux/skas/mem.c:76
76 printk(UM_KERN_ERR "\t%d\t0x%lx\n", i,
syscall_regs[i]);
(gdb)
16 0x0
75 for (i = 0; i < MAX_REG_NR; i++)
(gdb)
77 panic("do_syscall_stub : PTRACE_SETREGS
failed, errno = %d\n",
(gdb)
Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5
And ptrace_setregs() calling ptrace() seemed to returned -errno almost
immediately:
(gdb) s
ptrace_setregs (pid=19131, regs=0x820aae0) at
/mnt/hd0/download/linux-2.6-latest/arch/um/sys-i386/ptrace_user.c:18
18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
(gdb) s
19 return -errno;
(gdb) s
Why is it so?
-------------------------------------------------------------------------
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-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-07-20 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 19:22 [uml-devel] Kernel panic - not syncing: do_syscall_stub : PTRACE_SETREGS failed, errno = 5 Peter Teoh
2008-07-18 20:55 ` Jeff Dike
2008-07-20 9:15 ` Peter Teoh [this message]
2008-07-20 14:07 ` Jeff Dike
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=804dabb00807200215n32b5171do97d344f2f954c490@mail.gmail.com \
--to=htmldeveloper@gmail.com \
--cc=jdike@addtoit.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