Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Pullup across/adapt fix from OpenBSD:



details:   https://anonhg.NetBSD.org/src/rev/1601a7f21444
branches:  trunk
changeset: 755444:1601a7f21444
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Jun 06 09:12:39 2010 +0000

description:
Pullup across/adapt fix from OpenBSD:

Properly initialize the members of `struct mdproc' that deal with
single-stepping when we fork and reset them upon exec.

diffstat:

 sys/arch/hp700/hp700/machdep.c  |  6 ++++--
 sys/arch/hppa/hppa/vm_machdep.c |  8 ++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r 7a52e93e384d -r 1601a7f21444 sys/arch/hp700/hp700/machdep.c
--- a/sys/arch/hp700/hp700/machdep.c    Sun Jun 06 08:01:30 2010 +0000
+++ b/sys/arch/hp700/hp700/machdep.c    Sun Jun 06 09:12:39 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.85 2010/06/01 10:20:29 skrll Exp $       */
+/*     $NetBSD: machdep.c,v 1.86 2010/06/06 09:12:39 skrll Exp $       */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.85 2010/06/01 10:20:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.86 2010/06/06 09:12:39 skrll Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -1880,6 +1880,8 @@
        pcb->pcb_fpregs->fpr_regs[2] = 0;
        pcb->pcb_fpregs->fpr_regs[3] = 0;
 
+       l->l_md.md_bpva = 0;
+
        /* setup terminal stack frame */
        stack = (u_long)STACK_ALIGN(stack, 63);
        tf->tf_r3 = stack;
diff -r 7a52e93e384d -r 1601a7f21444 sys/arch/hppa/hppa/vm_machdep.c
--- a/sys/arch/hppa/hppa/vm_machdep.c   Sun Jun 06 08:01:30 2010 +0000
+++ b/sys/arch/hppa/hppa/vm_machdep.c   Sun Jun 06 09:12:39 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.44 2010/04/03 07:46:02 skrll Exp $    */
+/*     $NetBSD: vm_machdep.c,v 1.45 2010/06/06 09:12:39 skrll Exp $    */
 
 /*     $OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $    */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.44 2010/04/03 07:46:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.45 2010/06/06 09:12:39 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -112,6 +112,10 @@
        pcb2->pcb_fpregs->fpr_regs[2] = 0;
        pcb2->pcb_fpregs->fpr_regs[3] = 0;
 
+       l2->l_md.md_bpva = l1->l_md.md_bpva;
+       l2->l_md.md_bpsave[0] = l1->l_md.md_bpsave[0];
+       l2->l_md.md_bpsave[1] = l1->l_md.md_bpsave[1];
+
        uv = uvm_lwp_getuarea(l2);
        sp = (register_t)uv + PAGE_SIZE;
        l2->l_md.md_regs = tf = (struct trapframe *)sp;



Home | Main Index | Thread Index | Old Index