[PATCH] 2.4.0 i386 debug register fix

From: James Cownie (jcownie@etnus.com)
Date: Thu Sep 21 2000 - 06:14:43 EST


The problem
http://www.uwsg.iu.edu/hypermail/linux/kernel/0006.1/0841.html
which was fixed in 2.2.17 still remains in 2.4.0.

Here is a patch for 2.4.0

% diff -u traps.c-2.4.0-test7 traps.c
--- traps.c-2.4.0-test7 Sat Aug 5 00:15:38 2000
+++ traps.c Thu Sep 21 11:51:29 2000
@@ -520,6 +520,9 @@
         if (regs->eflags & VM_MASK)
                 goto debug_vm86;
 
+ /* Save debug status register where ptrace can see it */
+ tsk->thread.debugreg[6] = condition;
+
         /* Mask out spurious TF errors due to lazy TF clearing */
         if (condition & DR_STEP) {
                 /*
%

-- Jim

James Cownie <jcownie@etnus.com>
Etnus, LLC. +44 117 9071438
http://www.etnus.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:24 EST