summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-04-13 19:17:49 +0000
committeralc <alc@FreeBSD.org>2002-04-13 19:17:49 +0000
commita06013eb4e2cd400e5859e6a23daa9e8fbd10608 (patch)
tree1d536573bd8255f371605c03daa3e112b73d1485
parent9504d77e9c26ff12bf841c50bf5375702d73ba88 (diff)
downloadFreeBSD-src-a06013eb4e2cd400e5859e6a23daa9e8fbd10608.zip
FreeBSD-src-a06013eb4e2cd400e5859e6a23daa9e8fbd10608.tar.gz
o Remove vm_map_growstack() and useracc() from sendsig(). Copyout() and
suword() will automatically grow the stack if needed. o Add a comment that osigreturn() and sigreturn() are MPSAFE.
-rw-r--r--sys/sparc64/sparc64/machdep.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 74f7d2f..1436070 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -379,27 +379,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
sfp = (struct sigframe *)sp - 1;
PROC_UNLOCK(p);
- /*
- * vm_map_growstack() will fail if *sfp does not fit inside the stack
- * and the stack can not be grown.
- * useracc() will return FALSE if access is denied.
- */
fp = (struct frame *)sfp - 1;
- if (vm_map_growstack(p, (u_long)fp) != KERN_SUCCESS ||
- !useracc((caddr_t)fp, sizeof(*fp) + sizeof(*sfp), VM_PROT_WRITE)) {
- /*
- * Process has trashed its stack; give it an illegal
- * instruction to halt it in its tracks.
- */
- CTR2(KTR_SIG, "sendsig: trashed stack td=%p sfp=%p", td, sfp);
- PROC_LOCK(p);
- SIGACTION(p, SIGILL) = SIG_DFL;
- SIGDELSET(p->p_sigignore, SIGILL);
- SIGDELSET(p->p_sigcatch, SIGILL);
- SIGDELSET(p->p_sigmask, SIGILL);
- psignal(p, SIGILL);
- return;
- }
/* Translate the signal if appropriate. */
if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize)
@@ -452,6 +432,8 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* Stub to satisfy the reference to osigreturn in the syscall table. This
* is needed even for newer arches that don't support old signals because
* the syscall table is machine-independent.
+ *
+ * MPSAFE
*/
int
osigreturn(struct thread *td, struct osigreturn_args *uap)
@@ -466,6 +448,9 @@ struct sigreturn_args {
};
#endif
+/*
+ * MPSAFE
+ */
int
sigreturn(struct thread *td, struct sigreturn_args *uap)
{
OpenPOWER on IntegriCloud