diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-26 05:23:43 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-26 05:23:43 +0000 |
commit | 87c550209612d49384b0a8f1177ea278fc14bbc7 (patch) | |
tree | b3a354d29c205e40b172f436bbd2f6299a6aef4f /sys/arch/sparc64 | |
parent | f11198840aef6a17a2ba3d8668ef653d8adb535f (diff) |
Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only
generate one per process (not one per thread) and pass the correct
proc pointer down to the VFS layer. Permit generating of NAMI and
CSW records inside ktrace(2) itself.
ok deraadt@ millert@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 4f3dca565ad..a18a9c03a64 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.152 2014/03/22 06:05:45 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.153 2014/03/26 05:23:42 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -510,7 +510,7 @@ sendsig(catcher, sig, mask, code, type, val) * Arrange to continue execution at the code copied out in exec(). * It needs the function to call in %g1, and a new stack pointer. */ - addr = p->p_sigcode; + addr = p->p_p->ps_sigcode; tf->tf_global[1] = (vaddr_t)catcher; tf->tf_pc = addr; tf->tf_npc = addr + 4; diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 75c11621e25..51eab3abc0d 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.78 2013/04/02 13:24:57 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.79 2014/03/26 05:23:42 guenther Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -1241,8 +1241,8 @@ syscall(tf, code, pc) new = code & SYSCALL_G2RFLAG; code &= ~SYSCALL_G2RFLAG; - callp = p->p_emul->e_sysent; - nsys = p->p_emul->e_nsysent; + callp = p->p_p->ps_emul->e_sysent; + nsys = p->p_p->ps_emul->e_nsysent; /* * The first six system call arguments are in the six %o registers. @@ -1264,8 +1264,8 @@ syscall(tf, code, pc) nap--; break; case SYS___syscall: - if (code < nsys && - callp[code].sy_call != callp[p->p_emul->e_nosys].sy_call) + if (code < nsys && callp[code].sy_call != + callp[p->p_p->ps_emul->e_nosys].sy_call) break; /* valid system call */ if (tf->tf_out[6] & 1L) { /* longs *are* quadwords */ @@ -1281,7 +1281,7 @@ syscall(tf, code, pc) } if (code < 0 || code >= nsys) - callp += p->p_emul->e_nosys; + callp += p->p_p->ps_emul->e_nosys; else if (tf->tf_out[6] & 1L) { register_t *argp; |