diff options
author | alc <alc@FreeBSD.org> | 2002-03-19 04:54:30 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-03-19 04:54:30 +0000 |
commit | 536541a69dd637b889d15f197889edfd11d7e85a (patch) | |
tree | f76dfe9980f2c409796b27cb8d973ad8a7e2f335 /sys/i386/linux/linux_sysvec.c | |
parent | 21fc25cfdf4a00506690f4163a8a4391797d9c62 (diff) | |
download | FreeBSD-src-536541a69dd637b889d15f197889edfd11d7e85a.zip FreeBSD-src-536541a69dd637b889d15f197889edfd11d7e85a.tar.gz |
Eliminate unnecessary calls to grow_stack() and useracc() from linux_sendsig()
and linux_rt_sendsig(). (See i386/i386/machdep.c revisions 1.503 and 1.504.)
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 54 |
1 files changed, 5 insertions, 49 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 67302b0..4e273fa 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -285,32 +285,6 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) PROC_UNLOCK(p); /* - * grow() will return FALSE if the fp will not fit inside the stack - * and the stack can not be grown. useracc will return FALSE - * if access is denied. - */ - if ((grow_stack (p, (int)fp) == FALSE) || - !useracc((caddr_t)fp, sizeof (struct l_rt_sigframe), - VM_PROT_WRITE)) { - /* - * Process has trashed its stack; give it an illegal - * instruction to halt it in its tracks. - */ - PROC_LOCK(p); - SIGACTION(p, SIGILL) = SIG_DFL; - SIGDELSET(p->p_sigignore, SIGILL); - SIGDELSET(p->p_sigcatch, SIGILL); - SIGDELSET(p->p_sigmask, SIGILL); -#ifdef DEBUG - if (ldebug(rt_sendsig)) - printf(LMSG("rt_sendsig: bad stack %p, oonstack=%x"), - fp, oonstack); -#endif - psignal(p, SIGILL); - return; - } - - /* * Build the argument list for the signal handler. */ if (p->p_sysent->sv_sigtbl) @@ -374,9 +348,13 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. */ +#ifdef DEBUG + if (ldebug(rt_sendsig)) + printf(LMSG("rt_sendsig: bad stack %p, oonstack=%x"), + fp, oonstack); +#endif PROC_LOCK(p); sigexit(td, SIGILL); - /* NOTREACHED */ } /* @@ -444,27 +422,6 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) PROC_UNLOCK(p); /* - * grow() will return FALSE if the fp will not fit inside the stack - * and the stack can not be grown. useracc will return FALSE - * if access is denied. - */ - if ((grow_stack (p, (int)fp) == FALSE) || - !useracc((caddr_t)fp, sizeof (struct l_sigframe), - VM_PROT_WRITE)) { - /* - * Process has trashed its stack; give it an illegal - * instruction to halt it in its tracks. - */ - 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; - } - - /* * Build the argument list for the signal handler. */ if (p->p_sysent->sv_sigtbl) @@ -511,7 +468,6 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) */ PROC_LOCK(p); sigexit(td, SIGILL); - /* NOTREACHED */ } /* |