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

CVS: cvs.openbsd.org: src



CVSROOT:	/cvs
Module name:	src
Changes by:	bjc_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2001/02/11 05:59:40

Modified files:
	sys/arch/vax/vax: subr.s machdep.c 

Log message:
Previously, when sendsig() set up the current process's context to run
sigcode to call a handler, SP was set in the middle of the struct
trapframe/struct sigcontext pair placed on the stack.  This was adequate
when only one signal is being delivered at a time, but when two signals are
delivered in one syscall, the second invocation of sendsig() overwrote
some of the first sendsig() invocation's stack data.

The result was that under certain circumstances, (e.g., sending signals to
backgrounded processes from ksh) the argument passed to signal handlers
when the second signal (the one corresponding to the first sendsig()
invocation) was delivered was bogus data from the stack.  Therefore,
programs that depended on the "sigraised" argument to be accurate
blew up.

This fix ensures that sendsig() always leaves a process's SP out of the way
of structures that will be used.  AP is not moved, though, so sigreturn
can find the args correctly.  Also, sigcode is changed to compensate for the
SP change.




Visit your host, monkey.org