DragonFly kernel List (threaded) for 2007-02
DragonFly BSD
DragonFly kernel List (threaded) for 2007-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[PATCH] Passing the right signal when process tracing in a vkernel.


From: "Thomas E. Spanjaard" <tgen@xxxxxxxxxxxxx>
Date: Fri, 02 Feb 2007 17:09:35 +0000

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@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
Description: OpenPGP digital signature



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