patch-2.4.26 linux-2.4.26/arch/x86_64/ia32/ptrace32.c

Next file: linux-2.4.26/arch/x86_64/ia32/sys_ia32.c
Previous file: linux-2.4.26/arch/x86_64/ia32/ia32_ioctl.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/arch/x86_64/ia32/ptrace32.c linux-2.4.26/arch/x86_64/ia32/ptrace32.c
@@ -8,7 +8,7 @@
  * This allows to access 64bit processes too; but there is no way to see the extended 
  * register contents.
  *
- * $Id: ptrace32.c,v 1.18 2004/01/29 00:50:29 ak Exp $
+ * $Id: ptrace32.c,v 1.19 2004/01/29 03:31:13 ak Exp $
  */ 
 
 #include <linux/kernel.h>
@@ -73,9 +73,12 @@
 	R32(eip, rip);
 	R32(esp, rsp);
 
-	case offsetof(struct user32, regs.eflags): 
-		stack[offsetof(struct pt_regs, eflags)/8] = val & 0x44dd5; 
+	case offsetof(struct user32, regs.eflags): { 
+		__u64 *flags = &stack[offsetof(struct pt_regs, eflags)/8];
+		val &= FLAG_MASK;
+		*flags = val | (*flags & ~FLAG_MASK);
 		break;
+	}
 
 	case offsetof(struct user32, u_debugreg[4]): 
 	case offsetof(struct user32, u_debugreg[5]):

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)