[PATCH] Passing the right signal when process tracing in a vkernel.
Thomas E. Spanjaard
tgen at netphreax.net
Fri Feb 2 09:23:01 PST 2007
Attached diff fixes a signal 0 panic when tracing a process inside a
vkernel which does a syscall. How-to-reproduce inside a vkernel:
$ gdb ls
(gdb) break main
(gdb) r
(gdb) si
<repeatedly hammer your enter key, watch the panic>
I'm currently passing SIGTRAP because I think that makes sense, but I'm
not 100% sure if I need to do more. The problem was found by Simon
'corecode' Schubert.
Cheers,
--
Thomas E. Spanjaard
tgen at netphreax.net
diff --git a/sys/platform/vkernel/i386/trap.c b/sys/platform/vkernel/i386/trap.c
index 4e0f221..3515545 100644
--- a/sys/platform/vkernel/i386/trap.c
+++ b/sys/platform/vkernel/i386/trap.c
@@ -796,6 +796,13 @@ kernel_trap:
MAKEMPSAFE(have_mplock);
trap_fatal(frame, FALSE, eva);
goto out2;
+ case T_SYSCALL80:
+ /*
+ * Pass SIGTRAP when tracing a process inside a VKERNEL.
+ */
+ if (i == 0)
+ i = SIGTRAP;
+ /* break; */
}
/*
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00003.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070202/072ba322/attachment-0019.obj>
More information about the Kernel
mailing list