Subject: kern/10981: several items in struct sigacts should be in struct proc
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthew Orgass <darkstar@pgh.net>
List: netbsd-bugs
Date: 09/10/2000 08:07:13
>Number:         10981
>Category:       kern
>Synopsis:       several items in struct sigacts should be in struct proc
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 10 05:08:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     darkstar@pgh.net
>Release:        
>Organization:
>Environment:
>Description:

  Stuct sigacts currently contains five members that should be in struct
proc: ps_sigstk, ps_oldmask, ps_flags, ps_sig, and ps_code.  Placing them
in struct sigacts breaks various signal behaviors with kernel supported
threads. As NetBSD does not currently have kernel supported threads, this
only affects emulation of other OSes. 

>How-To-Repeat:

Matthias Scheler provided the following i386/Linux program which
demonstrates the problem with ps_oldmask and ps_flags being in sigacts: 

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

void *Tescht(void *Gugu)

{
 (void)sleep(1);
 (void)printf("Thread %ld has pid %d\n",(long)Gugu,getpid());
 return NULL;
}

int main(int argc,char **argv)

{
 long NumThreads,Index;
 pthread_t *LWP;

 if (argc!=2)
  {
   (void)fprintf(stderr,"Usage: %s numerofthreads\n",argv[0]);
   return EXIT_FAILURE;
  }
 NumThreads=strtol(argv[1],NULL,10);

 if ((LWP=calloc(NumThreads,sizeof(pthread_t)))==NULL)
  {
   perror("calloc");
   return EXIT_FAILURE;
  }
  
 (void)printf("main process has pid %d\n",getpid());
 for (Index=0; Index<NumThreads; Index++)
  if (pthread_create(&LWP[Index],NULL,Tescht,(void *)Index))
   {
    perror("pthread_create");
    return EXIT_FAILURE;
   }

 for (Index=0; Index<NumThreads; Index++)
(void)pthread_join(LWP[Index],NULL);
 (void)puts("main process finished");

 return EXIT_SUCCESS;
}


>Fix:

Index: sys/proc.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/proc.h,v
retrieving revision 1.105
diff -u -r1.105 proc.h
--- proc.h	2000/09/05 16:27:51	1.105
+++ proc.h	2000/09/10 11:03:25
@@ -188,11 +188,18 @@
 #define	p_endzero	p_startcopy
 
 /* The following fields are all copied upon creation in fork. */
-#define	p_startcopy	p_sigmask
+#define	p_startcopy	p_sigstk
 
+	struct  sigaltstack p_sigstk;  /* sp & on stack state variable */
+
 	sigset_t p_sigmask;	/* Current signal mask. */
 	sigset_t p_sigignore;	/* Signals being ignored. */
 	sigset_t p_sigcatch;	/* Signals being caught by user. */
+	sigset_t p_oldmask;	/* Previous mask for sigpause/sigsuspend. */
+
+	int	p_has_old_mask;	/* Need to restore previous mask. */
+	int	p_sig;		/* for core dump/debugger XXX */
+	u_long	p_code;		/* for core dump/debugger XXX */
 
 	u_char	p_priority;	/* Process priority. */
 	u_char	p_usrpri;	/* User-priority based on p_cpu and p_nice. */
Index: sys/signalvar.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/signalvar.h,v
retrieving revision 1.24
diff -u -r1.24 signalvar.h
--- signalvar.h	2000/08/20 21:50:12	1.24
+++ signalvar.h	2000/09/10 11:03:25
@@ -49,17 +49,9 @@
  */
 struct	sigacts {
 	struct	sigaction ps_sigact[NSIG];	/* disposition of signals */
-	struct	sigaltstack ps_sigstk;	/* sp & on stack state variable */
-	sigset_t ps_oldmask;		/* saved mask from before sigpause */
-	int	ps_flags;		/* signal flags, below */
-	int	ps_sig;			/* for core dump/debugger XXX */
-	long	ps_code;		/* for core dump/debugger XXX */
 	void	*ps_sigcode;		/* address of signal trampoline */
 	int	ps_refcnt;		/* reference count */
 };
-
-/* signal flags */
-#define	SAS_OLDMASK	0x01		/* need to restore mask before pause */
 
 /* additional signal action values, used only temporarily/internally */
 #define	SIG_CATCH	(void (*) __P((int)))2
Index: kern/kern_sig.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/kern_sig.c,v
retrieving revision 1.106
diff -u -r1.106 kern_sig.c
--- kern_sig.c	2000/08/22 17:28:29	1.106
+++ kern_sig.c	2000/09/10 11:03:30
@@ -316,9 +316,9 @@
 	/*
 	 * Reset stack state to the user stack.
 	 */
-	ps->ps_sigstk.ss_flags = SS_DISABLE;
-	ps->ps_sigstk.ss_size = 0;
-	ps->ps_sigstk.ss_sp = 0;
+	p->p_sigstk.ss_flags = SS_DISABLE;
+	p->p_sigstk.ss_size = 0;
+	p->p_sigstk.ss_sp = 0;
 
 	/* One reference. */
 	ps->ps_refcnt = 1;
@@ -359,9 +359,9 @@
 	/*
 	 * Reset stack state to the user stack.
 	 */
-	ps->ps_sigstk.ss_flags = SS_DISABLE;
-	ps->ps_sigstk.ss_size = 0;
-	ps->ps_sigstk.ss_sp = 0;
+	p->p_sigstk.ss_flags = SS_DISABLE;
+	p->p_sigstk.ss_size = 0;
+	p->p_sigstk.ss_sp = 0;
 }
 
 int
@@ -478,8 +478,8 @@
 		 * save it here and mark the sigacts structure
 		 * to indicate this.
 		 */
-		ps->ps_oldmask = p->p_sigmask;
-		ps->ps_flags |= SAS_OLDMASK;
+		p->p_oldmask = p->p_sigmask;
+		p->p_has_old_mask = 1;
 		(void) splsched();	/* XXXSMP */
 		p->p_sigmask = *ss;
 		p->p_sigcheck = 1;
@@ -526,23 +526,21 @@
 	const struct sigaltstack *nss;
 	struct sigaltstack *oss;
 {
-	struct sigacts *ps = p->p_sigacts;
-
 	if (oss)
-		*oss = ps->ps_sigstk;
+		*oss = p->p_sigstk;
 
 	if (nss) {
 		if (nss->ss_flags & ~SS_ALLBITS)
 			return (EINVAL);
 
 		if (nss->ss_flags & SS_DISABLE) {
-			if (ps->ps_sigstk.ss_flags & SS_ONSTACK)
+			if (p->p_sigstk.ss_flags & SS_ONSTACK)
 				return (EINVAL);
 		} else {
 			if (nss->ss_size < MINSIGSTKSZ)
 				return (ENOMEM);
 		}
-		ps->ps_sigstk = *nss;
+		p->p_sigstk = *nss;
 	}
 
 	return (0);
@@ -732,8 +730,8 @@
 		}
 		(void) spl0();		/* XXXSMP */
 	} else {
-		ps->ps_code = code;	/* XXX for core dump/debugger */
-		ps->ps_sig = signum;	/* XXX to verify code */
+		p->p_code = code;	/* XXX for core dump/debugger */
+		p->p_sig = signum;	/* XXX to verify code */
 		psignal(p, signum);
 	}
 }
@@ -1196,8 +1194,8 @@
 #ifdef KTRACE
 	if (KTRPOINT(p, KTR_PSIG))
 		ktrpsig(p,
-		    signum, action, ps->ps_flags & SAS_OLDMASK ?
-		    &ps->ps_oldmask : &p->p_sigmask, 0);
+		    signum, action, p->p_has_old_mask ?
+		    &p->p_oldmask : &p->p_sigmask, 0);
 #endif
 	if (action == SIG_DFL) {
 		/*
@@ -1223,18 +1221,18 @@
 		 * mask from before the sigpause is what we want
 		 * restored after the signal processing is completed.
 		 */
-		if (ps->ps_flags & SAS_OLDMASK) {
-			returnmask = &ps->ps_oldmask;
-			ps->ps_flags &= ~SAS_OLDMASK;
+		if (p->p_has_old_mask) {
+			returnmask = &p->p_oldmask;
+			p->p_has_old_mask = 0;
 		} else
 			returnmask = &p->p_sigmask;
 		p->p_stats->p_ru.ru_nsignals++;
-		if (ps->ps_sig != signum) {
+		if (p->p_sig != signum) {
 			code = 0;
 		} else {
-			code = ps->ps_code;
-			ps->ps_code = 0;
-			ps->ps_sig = 0;
+			code = p->p_code;
+			p->p_code = 0;
+			p->p_sig = 0;
 		}
 		(*p->p_emul->e_sendsig)(action, signum, returnmask, code);
 		(void) splsched();	/* XXXSMP */
@@ -1295,7 +1293,7 @@
 
 	p->p_acflag |= AXSIG;
 	if (sigprop[signum] & SA_CORE) {
-		p->p_sigacts->ps_sig = signum;
+		p->p_sig = signum;
 		if ((error = coredump(p)) == 0)
 			exitsig |= WCOREFLAG;
 
@@ -1400,8 +1398,8 @@
 	core.c_midmag = 0;
 	strncpy(core.c_name, p->p_comm, MAXCOMLEN);
 	core.c_nseg = 0;
-	core.c_signo = p->p_sigacts->ps_sig;
-	core.c_ucode = p->p_sigacts->ps_code;
+	core.c_signo = p->p_sig;
+	core.c_ucode = p->p_code;
 	core.c_cpusize = 0;
 	core.c_tsize = (u_long)ctob(vm->vm_tsize);
 	core.c_dsize = (u_long)ctob(vm->vm_dsize);
@@ -1478,8 +1476,8 @@
 	core.c_midmag = 0;
 	strncpy(core.c_name, p->p_comm, MAXCOMLEN);
 	core.c_nseg = 0;
-	core.c_signo = p->p_sigacts->ps_sig;
-	core.c_ucode = p->p_sigacts->ps_code;
+	core.c_signo = p->p_sig;
+	core.c_ucode = p->p_code;
 	core.c_cpusize = 0;
 	core.c_tsize = (u_long)ctob(vm->vm_tsize);
 	core.c_dsize = (u_long)ctob(vm->vm_dsize);
Index: arch/alpha/alpha/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/alpha/alpha/compat_13_machdep.c,v
retrieving revision 1.7
diff -u -r1.7 compat_13_machdep.c
--- compat_13_machdep.c	2000/08/15 22:16:17	1.7
+++ compat_13_machdep.c	2000/09/10 11:03:30
@@ -100,9 +100,9 @@
 
 	/* Restore signal stack. */
 	if (ksc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/*
 	 * Restore signal mask.  Note the mask is a "long" in the stack
Index: arch/alpha/alpha/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/alpha/alpha/machdep.c,v
retrieving revision 1.219
diff -u -r1.219 machdep.c
--- machdep.c	2000/08/15 22:16:17	1.219
+++ machdep.c	2000/09/10 11:03:36
@@ -1466,23 +1466,22 @@
 	struct proc *p = curproc;
 	struct sigcontext *scp, ksc;
 	struct trapframe *frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack, fsize, rndfsize;
 
 	frame = p->p_md.md_tf;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	fsize = sizeof(ksc);
 	rndfsize = ((fsize + 15) / 16) * 16;
 
 	if (onstack)
-		scp = (struct sigcontext *)((caddr_t)psp->ps_sigstk.ss_sp +
-						     psp->ps_sigstk.ss_size);
+		scp = (struct sigcontext *)((caddr_t)p->p_sigstk.ss_sp +
+						     p->p_sigstk.ss_size);
 	else
 		scp = (struct sigcontext *)(alpha_pal_rdusp());
 	scp = (struct sigcontext *)((caddr_t)scp - rndfsize);
@@ -1513,7 +1512,7 @@
 	bzero(ksc.sc_xxx, sizeof ksc.sc_xxx);			/* XXX */
 
 	/* Save signal stack. */
-	ksc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	ksc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	ksc.sc_mask = *mask;
@@ -1560,7 +1559,7 @@
 #endif
 
 	/* Set up the registers to return to sigcode. */
-	frame->tf_regs[FRAME_PC] = (u_int64_t)psp->ps_sigcode;
+	frame->tf_regs[FRAME_PC] = (u_int64_t)p->p_sigacts->ps_sigcode;
 	frame->tf_regs[FRAME_A0] = sig;
 	frame->tf_regs[FRAME_A1] = code;
 	frame->tf_regs[FRAME_A2] = (u_int64_t)scp;
@@ -1569,7 +1568,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if (sigdebug & SDB_FOLLOW)
@@ -1639,9 +1638,9 @@
 
 	/* Restore signal stack. */
 	if (ksc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &ksc.sc_mask, 0);
Index: arch/arm32/arm32/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm32/arm32/compat_13_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 compat_13_machdep.c
--- compat_13_machdep.c	1998/09/13 08:19:49	1.1
+++ compat_13_machdep.c	2000/09/10 11:03:37
@@ -95,9 +95,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&context.sc_mask, &mask);
Index: arch/arm32/arm32/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm32/arm32/machdep.c,v
retrieving revision 1.81
diff -u -r1.81 machdep.c
--- machdep.c	2000/06/29 08:52:58	1.81
+++ machdep.c	2000/09/10 11:03:39
@@ -600,20 +600,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->tf_usr_sp;
 	fp--;
@@ -645,7 +644,7 @@
 	frame.sf_sc.sc_spsr   = tf->tf_spsr;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -677,12 +676,12 @@
 	tf->tf_r2 = (int)frame.sf_scp;
 	tf->tf_r3 = (int)frame.sf_handler;
 	tf->tf_usr_sp = (int)fp;
-	tf->tf_pc = (int)psp->ps_sigcode;
+	tf->tf_pc = (int)p->p_sigacts->ps_sigcode;
 	cpu_cache_syncI();
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 
@@ -744,9 +743,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p-p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);
Index: arch/hp300/hp300/hpux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/hp300/hp300/hpux_machdep.c,v
retrieving revision 1.25
diff -u -r1.25 hpux_machdep.c
--- hpux_machdep.c	2000/06/29 08:23:02	1.25
+++ hpux_machdep.c	2000/09/10 11:03:42
@@ -424,7 +424,6 @@
 	struct proc *p = curproc;
 	struct hpuxsigframe *fp, kf;
 	struct frame *frame;
-	struct sigacts *psp = p->p_sigacts;
 	short ft;
 	int onstack, fsize;
 
@@ -433,14 +432,14 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	fsize = sizeof(struct hpuxsigframe);
 	if (onstack)
-		fp = (struct hpuxsigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						      psp->ps_sigstk.ss_size);
+		fp = (struct hpuxsigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						      p->p_sigstk.ss_size);
 	else
 		fp = (struct hpuxsigframe *)(frame->f_regs[SP]);
 	fp--;
@@ -516,7 +515,7 @@
 	kf.hsf_sc.hsc_pc	= frame->f_pc;
 
 	/* Save the signal stack. */
-	kf.hsf_sc.hsc_onstack	= psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	kf.hsf_sc.hsc_onstack	= p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	bsdtohpuxmask(mask, &kf.hsf_sc.hsc_mask);
 
@@ -548,11 +547,11 @@
 
 	/* Set up the registers to return to sigcode. */
 	frame->f_regs[SP] = (int)fp;
-	frame->f_pc = (int)psp->ps_sigcode;
+	frame->f_pc = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
@@ -691,9 +690,9 @@
 	frame->f_sr = scp->hsc_ps;
 
 	if (scp->hsc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	hpuxtobsdmask(scp->hsc_mask, &p->p_sigmask);
Index: arch/i386/i386/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/compat_13_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 compat_13_machdep.c
--- compat_13_machdep.c	1998/09/13 01:42:45	1.3
+++ compat_13_machdep.c	2000/09/10 11:03:42
@@ -113,9 +113,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&context.sc_mask, &mask);
Index: arch/i386/i386/freebsd_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/freebsd_machdep.c,v
retrieving revision 1.22
diff -u -r1.22 freebsd_machdep.c
--- freebsd_machdep.c	1998/09/13 01:43:17	1.22
+++ freebsd_machdep.c	2000/09/10 11:03:44
@@ -131,20 +131,19 @@
 	register struct proc *p = curproc;
 	register struct trapframe *tf;
 	struct freebsd_sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct freebsd_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-		    psp->ps_sigstk.ss_size);
+		fp = (struct freebsd_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+		    p->p_sigstk.ss_size);
 	else
 		fp = (struct freebsd_sigframe *)tf->tf_esp;
 	fp--;
@@ -183,7 +182,7 @@
 	frame.sf_sc.sc_ss = tf->tf_ss;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	native_sigset_to_sigset13(mask, &frame.sf_sc.sc_mask);
@@ -202,7 +201,7 @@
 	 */
 	tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-	tf->tf_eip = (int)psp->ps_sigcode;
+	tf->tf_eip = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
 	tf->tf_esp = (int)fp;
@@ -210,7 +209,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -284,9 +283,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&context.sc_mask, &mask);
Index: arch/i386/i386/ibcs2_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/ibcs2_machdep.c,v
retrieving revision 1.10
diff -u -r1.10 ibcs2_machdep.c
--- ibcs2_machdep.c	2000/01/10 19:28:15	1.10
+++ ibcs2_machdep.c	2000/09/10 11:03:45
@@ -99,20 +99,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-		    psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+		    p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->tf_esp;
 	fp--;
@@ -155,7 +154,7 @@
 	frame.sf_sc.sc_err = tf->tf_err;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -176,7 +175,7 @@
 	__asm("movl %w0,%%fs" : : "r" (GSEL(GUDATA_SEL, SEL_UPL)));
 	tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-	tf->tf_eip = (int)psp->ps_sigcode;
+	tf->tf_eip = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
 	tf->tf_esp = (int)fp;
@@ -184,7 +183,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 int
Index: arch/i386/i386/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.394
diff -u -r1.394 machdep.c
--- machdep.c	2000/08/16 04:44:35	1.394
+++ machdep.c	2000/09/10 11:03:50
@@ -910,20 +910,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->tf_esp;
 	fp--;
@@ -966,7 +965,7 @@
 	frame.sf_sc.sc_err = tf->tf_err;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -997,7 +996,7 @@
 	__asm("movl %w0,%%fs" : : "r" (GSEL(GUDATA_SEL, SEL_UPL)));
 	tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-	tf->tf_eip = (int)psp->ps_sigcode;
+	tf->tf_eip = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
 	tf->tf_esp = (int)fp;
@@ -1005,7 +1004,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -1080,9 +1079,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);
Index: arch/i386/i386/svr4_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/svr4_machdep.c,v
retrieving revision 1.47
diff -u -r1.47 svr4_machdep.c
--- svr4_machdep.c	2000/05/26 21:19:46	1.47
+++ svr4_machdep.c	2000/09/10 11:03:52
@@ -360,20 +360,19 @@
 	register struct proc *p = curproc;
 	register struct trapframe *tf;
 	struct svr4_sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct svr4_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						       psp->ps_sigstk.ss_size);
+		fp = (struct svr4_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						       p->p_sigstk.ss_size);
 	else
 		fp = (struct svr4_sigframe *)tf->tf_esp;
 	fp--;
@@ -415,7 +414,7 @@
 	 */
 	tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-	tf->tf_eip = (int)psp->ps_sigcode;
+	tf->tf_eip = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
 	tf->tf_esp = (int)fp;
@@ -423,7 +422,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
Index: arch/i386/i386/vm86.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/vm86.c,v
retrieving revision 1.22
diff -u -r1.22 vm86.c
--- vm86.c	1998/10/26 19:11:57	1.22
+++ vm86.c	2000/09/10 11:03:53
@@ -430,7 +430,7 @@
 #undef	DOREG
 
 	/* Going into vm86 mode jumps off the signal stack. */
-	p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+	p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	set_vflags(p, vm86s.regs.vmsc.sc_eflags | PSL_VM);
 
Index: arch/m68k/m68k/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/m68k/compat_13_machdep.c,v
retrieving revision 1.2
diff -u -r1.2 compat_13_machdep.c
--- compat_13_machdep.c	1999/08/16 02:59:23	1.2
+++ compat_13_machdep.c	2000/09/10 11:03:54
@@ -125,9 +125,9 @@
 
 	/* Restore signal stack. */
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
Index: arch/m68k/m68k/sig_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/m68k/sig_machdep.c,v
retrieving revision 1.13
diff -u -r1.13 sig_machdep.c
--- sig_machdep.c	1999/08/16 02:59:23	1.13
+++ sig_machdep.c	2000/09/10 11:03:55
@@ -85,7 +85,6 @@
 	struct proc *p = curproc;
 	struct sigframe *fp, kf;
 	struct frame *frame;
-	struct sigacts *psp = p->p_sigacts;
 	short ft;
 	int onstack, fsize;
 
@@ -94,14 +93,14 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	fsize = sizeof(struct sigframe);
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)(frame->f_regs[SP]);
 	fp--;
@@ -175,7 +174,7 @@
 	kf.sf_sc.sc_ps = frame->f_sr;
 
 	/* Save signal stack. */
-	kf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	kf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	kf.sf_sc.sc_mask = *mask;
@@ -212,11 +211,11 @@
 
 	/* Set up the registers to return to sigcode. */
 	frame->f_regs[SP] = (int)fp;
-	frame->f_pc = (int)psp->ps_sigcode;
+	frame->f_pc = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
@@ -356,9 +355,9 @@
 
 	/* Restore signal stack. */
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &scp->sc_mask, 0);
Index: arch/m68k/m68k/sunos_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/m68k/sunos_machdep.c,v
retrieving revision 1.19
diff -u -r1.19 sunos_machdep.c
--- sunos_machdep.c	1999/08/16 02:59:23	1.19
+++ sunos_machdep.c	2000/09/10 11:03:56
@@ -103,7 +103,6 @@
 	struct proc *p = curproc;
 	struct sunos_sigframe *fp, kf;
 	struct frame *frame;
-	struct sigacts *psp = p->p_sigacts;
 	short ft;
 	int onstack, fsize;
 
@@ -112,8 +111,8 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/*
 	 * if this is a hardware fault (ft >= FMT9), sunos_sendsig
@@ -121,7 +120,7 @@
 	 * have the process die unconditionally. 
 	 */
 	if (ft >= FMT9) {
-		psp->ps_sigact[sig].sa_handler = SIG_DFL;
+		p->p_sigacts->ps_sigact[sig].sa_handler = SIG_DFL;
 		sigdelset(&p->p_sigignore, sig);
 		sigdelset(&p->p_sigcatch, sig);
 		sigdelset(&p->p_sigmask, sig);
@@ -132,8 +131,8 @@
 	/* Allocate space for the signal handler context. */
 	fsize = sizeof(struct sunos_sigframe);
 	if (onstack)
-		fp = (struct sunos_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-							psp->ps_sigstk.ss_size);
+		fp = (struct sunos_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+							p->p_sigstk.ss_size);
 	else
 		fp = (struct sunos_sigframe *)(frame->f_regs[SP]);
 	fp--;
@@ -156,7 +155,7 @@
 	kf.sf_sc.sc_ps = frame->f_sr;
 
 	/* Save signal stack. */
-	kf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	kf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	native_sigset_to_sigset13(mask, &kf.sf_sc.sc_mask);
@@ -187,7 +186,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
@@ -245,9 +244,9 @@
 
 	/* Restore signal stack. */
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
Index: arch/m68k/m68k/svr4_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/m68k/svr4_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 svr4_machdep.c
--- svr4_machdep.c	2000/06/29 08:13:52	1.3
+++ svr4_machdep.c	2000/09/10 11:03:57
@@ -253,19 +253,18 @@
 	struct proc *p = curproc;
 	struct frame *frame;
 	struct svr4_sigframe *sfp, sf;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	frame = (struct frame *)p->p_md.md_regs;
 
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		sfp = (struct svr4_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-		    psp->ps_sigstk.ss_size);
+		sfp = (struct svr4_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+		    p->p_sigstk.ss_size);
 	else
 		sfp = (struct svr4_sigframe *)frame->f_regs[SP];
 	sfp--;
@@ -296,10 +295,10 @@
 
 	/* Set up the registers to return to sigcode. */
 	frame->f_regs[SP] = (int)sfp;
-	frame->f_pc = (int)psp->ps_sigcode;
+	frame->f_pc = (int)p->p_sigacts->ps_sigcode;
 
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
Index: arch/vax/vax/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/vax/vax/machdep.c,v
retrieving revision 1.106
diff -u -r1.106 machdep.c
--- machdep.c	2000/07/26 11:55:55	1.106
+++ machdep.c	2000/09/10 11:03:59
@@ -334,9 +334,9 @@
 		return (EINVAL);
 	}
 	if (cntx->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	native_sigset13_to_sigset(&cntx->sc_mask, &mask);
 	(void) sigprocmask1(p, SIG_SETMASK, &mask, 0);
@@ -374,9 +374,9 @@
 		return (EINVAL);
 	}
 	if (cntx->sc_onstack & 01)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &cntx->sc_mask, 0);
 
@@ -407,7 +407,6 @@
 	u_long		code;
 {
 	struct	proc	*p = curproc;
-	struct	sigacts *psp = p->p_sigacts;
 	struct	trapframe *syscf;
 	struct	sigcontext *sigctx, gsigctx;
 	struct	trampframe *trampf, gtrampf;
@@ -417,12 +416,12 @@
 	syscf = p->p_addr->u_pcb.framep;
 
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		cursp = ((int)psp->ps_sigstk.ss_sp + psp->ps_sigstk.ss_size);
+		cursp = ((int)p->p_sigstk.ss_sp + p->p_sigstk.ss_size);
 	else
 		cursp = syscf->sp;
 
@@ -445,7 +444,7 @@
 	gsigctx.sc_ap = syscf->ap;
 	gsigctx.sc_fp = syscf->fp; 
 	gsigctx.sc_sp = syscf->sp; 
-	gsigctx.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	gsigctx.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 	gsigctx.sc_mask = *mask;
 
 #if defined(COMPAT_13) || defined(COMPAT_ULTRIX)
@@ -456,13 +455,13 @@
 	    copyout(&gsigctx, sigctx, sizeof(gsigctx)))
 		sigexit(p, SIGILL);
 
-	syscf->pc = (int)psp->ps_sigcode;
+	syscf->pc = (int)p->p_sigacts->ps_sigcode;
 	syscf->psl = PSL_U | PSL_PREVU;
 	syscf->ap = cursp;
 	syscf->sp = cursp;
 
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 int	waittime = -1;
Index: arch/pc532/pc532/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/pc532/pc532/compat_13_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 compat_13_machdep.c
--- compat_13_machdep.c	1998/09/17 02:01:59	1.1
+++ compat_13_machdep.c	2000/09/10 11:04:00
@@ -99,9 +99,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&context.sc_mask, &mask);
Index: arch/pc532/pc532/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/pc532/pc532/machdep.c,v
retrieving revision 1.115
diff -u -r1.115 machdep.c
--- machdep.c	2000/07/18 12:45:51	1.115
+++ machdep.c	2000/09/10 11:04:03
@@ -325,20 +325,19 @@
 	struct proc *p = curproc;
 	struct reg *regs;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	regs = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)regs->r_sp;
 	fp--;
@@ -365,7 +364,7 @@
 	frame.sf_sc.sc_reg[REG_R0] = regs->r_r0;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save the signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -393,11 +392,11 @@
 	 * Build context to run handler in.
 	 */
 	regs->r_sp = (int)fp;
-	regs->r_pc = (int)psp->ps_sigcode;
+	regs->r_pc = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -456,9 +455,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);
Index: arch/powerpc/powerpc/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/powerpc/powerpc/compat_13_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 compat_13_machdep.c
--- compat_13_machdep.c	1998/09/13 09:15:52	1.1
+++ compat_13_machdep.c	2000/09/10 11:04:03
@@ -71,9 +71,9 @@
 
 	/* Restore signal stack. */
 	if (sc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&sc.sc_mask, &mask);
Index: arch/powerpc/powerpc/sig_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/powerpc/powerpc/sig_machdep.c,v
retrieving revision 1.3
diff -u -r1.3 sig_machdep.c
--- sig_machdep.c	2000/04/03 10:23:24	1.3
+++ sig_machdep.c	2000/09/10 11:04:04
@@ -53,20 +53,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = trapframe(p);
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->fixreg[1];
 	fp = (struct sigframe *)((int)(fp - 1) & ~0xf);
@@ -79,7 +78,7 @@
 	bcopy(tf, &frame.sf_sc.sc_frame, sizeof *tf);
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -111,11 +110,11 @@
 	tf->fixreg[3] = (int)sig;
 	tf->fixreg[4] = (int)code;
 	tf->fixreg[5] = (int)&fp->sf_sc;
-	tf->srr0 = (int)psp->ps_sigcode;
+	tf->srr0 = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -150,9 +149,9 @@
 
 	/* Restore signal stack. */
 	if (sc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &sc.sc_mask, 0);
Index: arch/sh3/sh3/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sh3/sh3/compat_13_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 compat_13_machdep.c
--- compat_13_machdep.c	1999/09/13 10:31:27	1.1
+++ compat_13_machdep.c	2000/09/10 11:04:04
@@ -105,9 +105,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&context.sc_mask, &mask);
Index: arch/sh3/sh3/sh3_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sh3/sh3/sh3_machdep.c,v
retrieving revision 1.8
diff -u -r1.8 sh3_machdep.c
--- sh3_machdep.c	2000/06/29 07:44:05	1.8
+++ sh3_machdep.c	2000/09/10 11:04:06
@@ -229,20 +229,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->tf_r15;
 	fp--;
@@ -279,7 +278,7 @@
 #endif
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -306,7 +305,7 @@
 	/*
 	 * Build context to run handler in.
 	 */
-	tf->tf_spc = (int)psp->ps_sigcode;
+	tf->tf_spc = (int)p->p_sigacts->ps_sigcode;
 #ifdef TODO
 	tf->tf_ssr &= ~(PSL_T|PSL_VM|PSL_AC);
 #endif
@@ -314,7 +313,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -386,9 +385,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);
 
Index: arch/sparc/sparc/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/sparc/compat_13_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 compat_13_machdep.c
--- compat_13_machdep.c	1998/09/13 20:33:33	1.1
+++ compat_13_machdep.c	2000/09/10 11:04:06
@@ -100,9 +100,9 @@
 	tf->tf_out[6] = scp->sc_sp;
 
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
Index: arch/sparc/sparc/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/sparc/machdep.c,v
retrieving revision 1.170
diff -u -r1.170 machdep.c
--- machdep.c	2000/07/09 20:57:49	1.170
+++ machdep.c	2000/09/10 11:04:11
@@ -425,7 +425,6 @@
 	u_long code;
 {
 	struct proc *p = curproc;
-	struct sigacts *psp = p->p_sigacts;
 	struct sigframe *fp;
 	struct trapframe *tf;
 	int addr, onstack, oldsp, newsp;
@@ -439,12 +438,12 @@
 	 * one signal frame, and align.
 	 */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-		                                  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+		                                  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)oldsp;
 
@@ -468,7 +467,7 @@
 	/*
 	 * Build the signal context to be used by sigreturn.
 	 */
-	sf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	sf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 	sf.sf_sc.sc_mask = *mask;
 #ifdef COMPAT_13
 	/*
@@ -519,7 +518,7 @@
 	 * 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 = (int)psp->ps_sigcode;
+	addr = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_global[1] = (int)catcher;
 	tf->tf_pc = addr;
 	tf->tf_npc = addr + 4;
@@ -527,7 +526,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
@@ -589,9 +588,9 @@
 	tf->tf_out[6] = scp->sc_sp;
 
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask */
 	(void) sigprocmask1(p, SIG_SETMASK, &scp->sc_mask, 0);
Index: arch/sparc/sparc/sunos_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/sparc/sunos_machdep.c,v
retrieving revision 1.7
diff -u -r1.7 sunos_machdep.c
--- sunos_machdep.c	1998/09/17 02:30:02	1.7
+++ sunos_machdep.c	2000/09/10 11:04:12
@@ -70,7 +70,6 @@
 	u_long code;
 {
 	struct proc *p = curproc;
-	struct sigacts *psp = p->p_sigacts;
 	struct sunos_sigframe *fp;
 	struct trapframe *tf;
 	int addr, onstack, oldsp, newsp;
@@ -84,12 +83,12 @@
 	 * one signal frame, and align.
 	 */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	if (onstack)
 		fp = (struct sunos_sigframe *)
-		     ((caddr_t)psp->ps_sigstk.ss_sp + psp->ps_sigstk.ss_size);
+		     ((caddr_t)p->p_sigstk.ss_sp + p->p_sigstk.ss_size);
 	else
 		fp = (struct sunos_sigframe *)oldsp;
 
@@ -113,7 +112,7 @@
 	/*
 	 * Build the signal context to be used by sigreturn.
 	 */
-	sf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	sf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 	native_sigset_to_sigset13(mask, &sf.sf_sc.sc_mask);
 	sf.sf_sc.sc_sp = oldsp;
 	sf.sf_sc.sc_pc = tf->tf_pc;
@@ -162,7 +161,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sunos_sigdebug & SDB_KSTACK) && p->p_pid == sunos_sigpid)
Index: arch/sparc/sparc/svr4_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc/sparc/svr4_machdep.c,v
retrieving revision 1.39
diff -u -r1.39 svr4_machdep.c
--- svr4_machdep.c	2000/05/26 21:20:19	1.39
+++ svr4_machdep.c	2000/09/10 11:04:14
@@ -455,7 +455,6 @@
 	register struct proc *p = curproc;
 	register struct trapframe *tf;
 	struct svr4_sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack, oldsp, newsp, addr;
 
 	tf = (struct trapframe *)p->p_md.md_tf;
@@ -463,15 +462,15 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/*
 	 * Allocate space for the signal handler context.
 	 */
 	if (onstack)
-		fp = (struct svr4_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-		                                       psp->ps_sigstk.ss_size);
+		fp = (struct svr4_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+		                                       p->p_sigstk.ss_size);
 	else
 		fp = (struct svr4_sigframe *)oldsp;
 	fp = (struct svr4_sigframe *) ((int) (fp - 1) & ~7);
@@ -516,7 +515,7 @@
 	/*
 	 * Build context to run handler in.
 	 */
-	addr = (int)psp->ps_sigcode;
+	addr = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_pc = addr;
 	tf->tf_npc = addr + 4;
 	tf->tf_global[1] = (int)catcher;
@@ -524,7 +523,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 
Index: arch/sparc64/sparc64/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/sparc64/compat_13_machdep.c,v
retrieving revision 1.9
diff -u -r1.9 compat_13_machdep.c
--- compat_13_machdep.c	2000/08/01 00:28:55	1.9
+++ compat_13_machdep.c	2000/09/10 11:04:14
@@ -150,9 +150,9 @@
 #endif
 
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
Index: arch/sparc64/sparc64/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/sparc64/machdep.c,v
retrieving revision 1.86
diff -u -r1.86 machdep.c
--- machdep.c	2000/08/01 16:49:47	1.86
+++ machdep.c	2000/09/10 11:04:19
@@ -488,7 +488,6 @@
 	u_long code;
 {
 	struct proc *p = curproc;
-	struct sigacts *psp = p->p_sigacts;
 	struct sigframe *fp;
 	struct trapframe64 *tf;
 	vaddr_t addr; 
@@ -504,16 +503,16 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/*
 	 * Compute new user stack addresses, subtract off
 	 * one signal frame, and align.
 	 */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)oldsp;
 	/* Allocate an aligned sigframe */
@@ -545,7 +544,7 @@
 	/*
 	 * Build the signal context to be used by sigreturn.
 	 */
-	sf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	sf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 	sf.sf_sc.sc_mask = *mask;
 #ifdef COMPAT_13
 	/*
@@ -613,7 +612,7 @@
 	 * 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 = (vaddr_t)psp->ps_sigcode;
+	addr = (vaddr_t)p->p_sigacts->ps_sigcode;
 	tf->tf_global[1] = (vaddr_t)catcher;
 	tf->tf_pc = addr;
 	tf->tf_npc = addr + 4;
@@ -621,7 +620,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) {
@@ -728,9 +727,9 @@
 
 	/* Restore signal stack. */
 	if (sc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &sc.sc_mask, 0);
Index: arch/sparc64/sparc64/netbsd32_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/sparc64/netbsd32_machdep.c,v
retrieving revision 1.9
diff -u -r1.9 netbsd32_machdep.c
--- netbsd32_machdep.c	2000/08/01 00:34:13	1.9
+++ netbsd32_machdep.c	2000/09/10 11:04:21
@@ -131,7 +131,6 @@
 	u_long code;
 {
 	register struct proc *p = curproc;
-	register struct sigacts *psp = p->p_sigacts;
 	register struct sparc32_sigframe *fp;
 	register struct trapframe64 *tf;
 	register int addr, onstack; 
@@ -145,12 +144,12 @@
 	oldsp = (struct rwindow32 *)(u_long)(u_int)tf->tf_out[6];
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 	if (onstack) {
-		fp = (struct sparc32_sigframe *)((char *)psp->ps_sigstk.ss_sp +
-					 psp->ps_sigstk.ss_size);
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		fp = (struct sparc32_sigframe *)((char *)p->p_sigstk.ss_sp +
+					 p->p_sigstk.ss_size);
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	} else
 		fp = (struct sparc32_sigframe *)oldsp;
 	fp = (struct sparc32_sigframe *)((long)(fp - 1) & ~7);
@@ -239,7 +238,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) {
@@ -328,9 +327,9 @@
 	}
 #endif
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
@@ -422,9 +421,9 @@
 
 	/* Restore signal stack. */
 	if (sc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &sc.sc_mask, 0);
Index: arch/sparc64/sparc64/sunos_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/sparc64/sunos_machdep.c,v
retrieving revision 1.11
diff -u -r1.11 sunos_machdep.c
--- sunos_machdep.c	2000/08/02 22:26:35	1.11
+++ sunos_machdep.c	2000/09/10 11:04:22
@@ -86,7 +86,6 @@
 	u_long code;
 {
 	register struct proc *p = curproc;
-	register struct sigacts *psp = p->p_sigacts;
 	register struct sunos_sigframe *fp;
 	register struct trapframe64 *tf;
 	register int addr, onstack; 
@@ -101,12 +100,12 @@
 	 * one signal frame, and align.
 	 */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	if (onstack)
-		fp = (struct sunos_sigframe *)((char *)psp->ps_sigstk.ss_sp +
-					       psp->ps_sigstk.ss_size);
+		fp = (struct sunos_sigframe *)((char *)p->p_sigstk.ss_sp +
+					       p->p_sigstk.ss_size);
 	else
 		fp = (struct sunos_sigframe *)oldsp;
 	fp = (struct sunos_sigframe *)((long)(fp - 1) & ~7);
@@ -134,7 +133,7 @@
 	/*
 	 * Build the signal context to be used by sigreturn.
 	 */
-	sf.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	sf.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 	native_sigset_to_sigset13(mask, &sf.sf_sc.sc_mask);
 	sf.sf_sc.sc_sp = (long)oldsp;
 	sf.sf_sc.sc_pc = tf->tf_pc;
@@ -271,9 +270,9 @@
 #endif
 
 	if (scp->sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask */
 	native_sigset13_to_sigset(&scp->sc_mask, &mask);
Index: arch/sparc64/sparc64/svr4_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/sparc64/svr4_machdep.c,v
retrieving revision 1.13
diff -u -r1.13 svr4_machdep.c
--- svr4_machdep.c	2000/05/26 21:20:21	1.13
+++ svr4_machdep.c	2000/09/10 11:04:26
@@ -463,7 +463,6 @@
 	register struct proc *p = curproc;
 	register struct trapframe64 *tf;
 	struct svr4_sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 	vaddr_t oldsp, newsp, addr;
 
@@ -472,15 +471,15 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/*
 	 * Allocate space for the signal handler context.
 	 */
 	if (onstack)
-		fp = (struct svr4_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						       psp->ps_sigstk.ss_size);
+		fp = (struct svr4_sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						       p->p_sigstk.ss_size);
 	else
 		fp = (struct svr4_sigframe *)oldsp;
 	fp = (struct svr4_sigframe *) ((long) (fp - 1) & ~7);
@@ -550,7 +549,7 @@
 	/*
 	 * Build context to run handler in.
 	 */
-	addr = (vaddr_t)psp->ps_sigcode;
+	addr = (vaddr_t)p->p_sigacts->ps_sigcode;
 	tf->tf_pc = addr;
 	tf->tf_npc = addr + 4;
 	tf->tf_global[1] = (vaddr_t)catcher;
@@ -558,7 +557,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) {
 		printf("svr4_sendsig: about to return to catcher %p thru %p\n", 
Index: arch/mips/mips/compat_13_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/compat_13_machdep.c,v
retrieving revision 1.7
diff -u -r1.7 compat_13_machdep.c
--- compat_13_machdep.c	1999/04/24 08:10:38	1.7
+++ compat_13_machdep.c	2000/09/10 11:04:26
@@ -78,9 +78,9 @@
 
 	/* Restore signal stack. */
 	if (ksc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	native_sigset13_to_sigset(&ksc.sc_mask, &mask);
Index: arch/mips/mips/mips_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/mips/mips/mips_machdep.c,v
retrieving revision 1.99
diff -u -r1.99 mips_machdep.c
--- mips_machdep.c	2000/08/02 06:46:47	1.99
+++ mips_machdep.c	2000/09/10 11:04:29
@@ -728,7 +728,6 @@
 	struct proc *p = curproc;
 	struct sigframe *fp;
 	struct frame *f;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 	struct sigcontext ksc;
 
@@ -736,13 +735,13 @@
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		/* cast for _MIPS_BSD_API == _MIPS_BSD_API_LP32_64CLEAN case */
 		fp = (struct sigframe *)(u_int32_t)f->f_regs[SP];
@@ -775,7 +774,7 @@
 	}
 
 	/* Save signal stack. */
-	ksc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	ksc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	ksc.sc_mask = *mask;
@@ -816,11 +815,11 @@
 	f->f_regs[SP] = (int)fp;
 
 	/* Signal trampoline code is at base of user stack. */
-	f->f_regs[RA] = (int)psp->ps_sigcode;
+	f->f_regs[RA] = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_FOLLOW) ||
@@ -882,9 +881,9 @@
 
 	/* Restore signal stack. */
 	if (ksc.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &ksc.sc_mask, 0);
Index: arch/arm26/arm26/vm_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm26/arm26/vm_machdep.c,v
retrieving revision 1.6
diff -u -r1.6 vm_machdep.c
--- vm_machdep.c	2000/08/22 21:22:51	1.6
+++ vm_machdep.c	2000/09/10 11:04:30
@@ -194,20 +194,19 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 
 	tf = p->p_addr->u_pcb.pcb_tf;
 
 	/* Do we need to jump onto the signal stack? */
 	onstack =
-	    (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-	    (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	    (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+	    (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context. */
 	if (onstack)
-		fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+		fp = (struct sigframe *)((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		fp = (struct sigframe *)tf->tf_r13;
 	fp--;
@@ -237,7 +236,7 @@
 	frame.sf_sc.sc_r15 = tf->tf_r15;
 
 	/* Save signal stack. */
-	frame.sf_sc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+	frame.sf_sc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
 
 	/* Save signal mask. */
 	frame.sf_sc.sc_mask = *mask;
@@ -259,11 +258,11 @@
 	tf->tf_r2 = (int)frame.sf_scp;
 	tf->tf_r3 = (int)frame.sf_handler;
 	tf->tf_r13 = (int)fp;
-	tf->tf_r15 = (int)psp->ps_sigcode;
+	tf->tf_r15 = (int)p->p_sigacts->ps_sigcode;
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -321,9 +320,9 @@
 
 	/* Restore signal stack. */
 	if (context.sc_onstack & SS_ONSTACK)
-		p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-		p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+		p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	(void) sigprocmask1(p, SIG_SETMASK, &context.sc_mask, 0);
Index: compat/linux/arch/m68k/linux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/arch/m68k/linux_machdep.c,v
retrieving revision 1.4
diff -u -r1.4 linux_machdep.c
--- linux_machdep.c	1999/04/19 20:58:38	1.4
+++ linux_machdep.c	2000/09/10 11:04:33
@@ -81,7 +81,7 @@
 void setup_linux_sigframe __P((struct frame *frame, int sig, sigset_t *mask,
 				caddr_t usp));
 void setup_linux_rt_sigframe __P((struct frame *frame, int sig, sigset_t *mask,
-				caddr_t usp, struct sigacts *psp));
+				caddr_t usp));
 
 /*
  * Deal with some m68k-specific things in the Linux emulation code.
@@ -264,12 +264,11 @@
  * Setup signal frame for new RT signal interface.
  */
 void
-setup_linux_rt_sigframe(frame, sig, mask, usp, psp)
+setup_linux_rt_sigframe(frame, sig, mask, usp)
 	struct frame *frame;
 	int sig;
 	sigset_t *mask;
 	caddr_t usp;
-	struct sigacts *psp;
 {
 	struct proc *p = curproc;
 	struct linux_rt_sigframe *fp, kf;
@@ -404,11 +403,11 @@
 
 	/* Build the signal context to be used by sigreturn. */
 	native_to_linux_sigset(mask, &kf.sf_uc.uc_sigmask);
-	kf.sf_uc.uc_stack.ss_sp = psp->ps_sigstk.ss_sp;
+	kf.sf_uc.uc_stack.ss_sp = p->p_sigstk.ss_sp;
 	kf.sf_uc.uc_stack.ss_flags =
-		(psp->ps_sigstk.ss_flags & SS_ONSTACK ? LINUX_SS_ONSTACK : 0) |
-		(psp->ps_sigstk.ss_flags & SS_DISABLE ? LINUX_SS_DISABLE : 0);
-	kf.sf_uc.uc_stack.ss_size = psp->ps_sigstk.ss_size;
+		(p->p_sigstk.ss_flags & SS_ONSTACK ? LINUX_SS_ONSTACK : 0) |
+		(p->p_sigstk.ss_flags & SS_DISABLE ? LINUX_SS_DISABLE : 0);
+	kf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size;
 
 	if (copyout(&kf, fp, sizeof(struct linux_rt_sigframe))) {
 #ifdef DEBUG
@@ -454,25 +453,24 @@
 {
 	struct proc *p = curproc;
 	struct frame *frame;
-	struct sigacts *psp = p->p_sigacts;
 	caddr_t usp;		/* user stack for signal context */
 	int onstack;
 
 	frame = (struct frame *)p->p_md.md_regs;
 
 	/* Do we need to jump onto the signal stack? */
-	onstack = (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-		  (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	onstack = (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+		  (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Determine user stack for the signal handler context. */
 	if (onstack)
-		usp = (caddr_t)psp->ps_sigstk.ss_sp + psp->ps_sigstk.ss_size;
+		usp = (caddr_t)p->p_sigstk.ss_sp + p->p_sigstk.ss_size;
 	else
 		usp = (caddr_t)frame->f_regs[SP];
 
 	/* Setup the signal frame (and part of the trapframe). */
 	if (p->p_sigacts->ps_sigact[sig].sa_flags & SA_SIGINFO)
-		setup_linux_rt_sigframe(frame, sig, mask, usp, psp);
+		setup_linux_rt_sigframe(frame, sig, mask, usp);
 	else
 		setup_linux_sigframe(frame, sig, mask, usp);
 
@@ -481,7 +479,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 
 #ifdef DEBUG
 	if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
@@ -563,7 +561,7 @@
 #endif
 
 	/* Restore signal stack. */
-	p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+	p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 #if LINUX__NSIG_WORDS > 1
@@ -667,7 +665,6 @@
 	struct linux_ucontext *ucp;	/* ucontext in user space */
 	struct linux_ucontext tuc;	/* copy of *ucp */
 	sigset_t mask;
-	struct sigacts *psp;
 	int sz = 0;			/* extra frame size */
 
 	/*
@@ -715,9 +712,8 @@
 		goto bad;
 
 	/* Restore signal stack. */
-	psp = p->p_sigacts;
-	psp->ps_sigstk.ss_flags =
-		(psp->ps_sigstk.ss_flags & ~SS_ONSTACK) |
+	p->p_sigstk.ss_flags =
+		(p->p_sigstk.ss_flags & ~SS_ONSTACK) |
 		(tuc.uc_stack.ss_flags & LINUX_SS_ONSTACK ? SS_ONSTACK : 0);
 
 	/* Restore signal mask. */
Index: compat/linux/arch/alpha/linux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/arch/alpha/linux_machdep.c,v
retrieving revision 1.10
diff -u -r1.10 linux_machdep.c
--- linux_machdep.c	2000/06/29 02:40:37	1.10
+++ linux_machdep.c	2000/09/10 11:04:35
@@ -107,14 +107,14 @@
 {
 	struct proc *p = curproc;
 	struct linux_rt_sigframe *sfp, sigframe;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 	int fsize, rndfsize;
 	extern char linux_rt_sigcode[], linux_rt_esigcode[];
 
 	/* Do we need to jump onto the signal stack? */
-	onstack = (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-		  (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	onstack = (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+		  (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) !=
+0;
 
 	/* Allocate space for the signal handler context.  */
 	fsize = sizeof(struct linux_rt_sigframe);
@@ -122,8 +122,8 @@
 
 	if (onstack)
 		sfp = (struct linux_rt_sigframe *)
-					((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+					((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		sfp = (struct linux_rt_sigframe *)(alpha_pal_rdusp());
 	sfp = (struct linux_rt_sigframe *)((caddr_t)sfp - rndfsize);
@@ -202,7 +202,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 void setup_linux_sigframe(tf, sig, mask)
@@ -212,14 +212,13 @@
 {
 	struct proc *p = curproc;
 	struct linux_sigframe *sfp, sigframe;
-	struct sigacts *psp = p->p_sigacts;
 	int onstack;
 	int fsize, rndfsize;
 	extern char linux_sigcode[], linux_esigcode[];
 
 	/* Do we need to jump onto the signal stack? */
-	onstack = (psp->ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
-		  (psp->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
+	onstack = (p->p_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
+		  (p->p_sigacts->ps_sigact[sig].sa_flags & SA_ONSTACK) != 0;
 
 	/* Allocate space for the signal handler context.  */
 	fsize = sizeof(struct linux_sigframe);
@@ -227,8 +226,8 @@
 
 	if (onstack)
 		sfp = (struct linux_sigframe *)
-					((caddr_t)psp->ps_sigstk.ss_sp +
-						  psp->ps_sigstk.ss_size);
+					((caddr_t)p->p_sigstk.ss_sp +
+						  p->p_sigstk.ss_size);
 	else
 		sfp = (struct linux_sigframe *)(alpha_pal_rdusp());
 	sfp = (struct linux_sigframe *)((caddr_t)sfp - rndfsize);
@@ -290,7 +289,7 @@
 
 	/* Remember that we're now on the signal stack. */
 	if (onstack)
-		psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+		p->p_sigstk.ss_flags |= SS_ONSTACK;
 }
 
 /*
@@ -369,9 +368,9 @@
 	 * an onstack member.  This could be needed in the future.
 	 */
 	if (context.sc_onstack & LINUX_SA_ONSTACK)
-	    p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+	    p->p_sigstk.ss_flags |= SS_ONSTACK;
 	else
-	    p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+	    p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Reset the signal mask */
 	(void) sigprocmask1(p, SIG_SETMASK, mask, 0);
Index: compat/linux/arch/i386/linux_machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/linux/arch/i386/linux_machdep.c,v
retrieving revision 1.50
diff -u -r1.50 linux_machdep.c
--- linux_machdep.c	2000/06/11 09:19:27	1.50
+++ linux_machdep.c	2000/09/10 11:04:38
@@ -136,7 +136,6 @@
 	struct proc *p = curproc;
 	struct trapframe *tf;
 	struct linux_sigframe *fp, frame;
-	struct sigacts *psp = p->p_sigacts;
 
 	tf = p->p_md.md_regs;
 
@@ -200,7 +199,7 @@
 	 */
 	tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
 	tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
-	tf->tf_eip = (int)psp->ps_sigcode;
+	tf->tf_eip = (int)p->p_sigacts->ps_sigcode;
 	tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL);
 	tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC);
 	tf->tf_esp = (int)fp;
@@ -292,7 +291,7 @@
 	tf->tf_ss = context.sc_ss;
 
 	/* Restore signal stack. */
-	p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+	p->p_sigstk.ss_flags &= ~SS_ONSTACK;
 
 	/* Restore signal mask. */
 	linux_old_to_native_sigset(&context.sc_mask, &mask);
Index: compat/svr4/svr4_signal.c
===================================================================
RCS file: /cvsroot/syssrc/sys/compat/svr4/svr4_signal.c,v
retrieving revision 1.39
diff -u -r1.39 svr4_signal.c
--- svr4_signal.c	2000/07/27 14:00:56	1.39
+++ svr4_signal.c	2000/09/10 11:04:39
@@ -560,7 +560,7 @@
 
 	/* get stack state. XXX: solaris appears to do this */
 #if 0
-	svr4_to_native_sigaltstack(&uc->uc_stack, &p->p_sigacts->ps_sigstk);
+	svr4_to_native_sigaltstack(&uc->uc_stack, &p->p_sigstk);
 #else
 	ss->ss_sp = (void *)(((u_long) sp) & ~(16384 - 1));
 	ss->ss_size = 16384;
@@ -590,7 +590,7 @@
 	/* set signal stack */
 	if (uc->uc_flags & SVR4_UC_STACK) {
 		svr4_to_native_sigaltstack(&uc->uc_stack,
-		    &p->p_sigacts->ps_sigstk);
+		    &p->p_sigstk);
 	}
 
 	/* set signal mask */



>Release-Note:
>Audit-Trail:
>Unformatted:
 >System: Any system with compatability with other OSes that provide kernel
 supported threads.