tech-kern archive

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

Re: T_TRCTRAP handling



On 02/07/2018 11:14 AM, Martin Husemann wrote:
> QEMU should never let the kernel see any exceptions or other traces of being
> debugged, IMHO.
>
> To me this sounds like a qemu bug.

Martin is right. It is a QEMU bug that only occurs when KVM virtualization is
enabled.

I also have a minor cosmetic/consistency suggestion. On i386, information about
fatal T_TRCTRAPs is not printed to the kernel ring buffer. On kernels with
DDB/KGDB disabled it would not be obvious why the kernel panicked upon
receiving one. On amd64, T_TRCTRAP is logged like all the other traps.

Regards,
Dimitris


cvs diff: Diffing .
Index: trap.c
===================================================================
RCS file: /pub/NetBSD-CVS/src/sys/arch/i386/i386/trap.c,v
retrieving revision 1.292
diff -u -p -r1.292 trap.c
--- trap.c	27 Jan 2018 09:33:25 -0000	1.292
+++ trap.c	12 Feb 2018 12:13:45 -0000
@@ -307,8 +307,7 @@ trap(struct trapframe *frame)

 	default:
 	we_re_toast:
-		if (type != T_TRCTRAP)
-			trap_print(frame, l);
+		trap_print(frame, l);

 		if (kdb_trap(type, 0, frame))
 			return;



Home | Main Index | Thread Index | Old Index