Subject: Re: 2nd review of fixes to sig_return() and LDT's
To: None <brezak@apollo.hp.com>
From: Chris G. Demetriou <cgd@nobozo.CS.Berkeley.EDU>
List: port-i386
Date: 01/07/1994 20:44:33
John,

*now* i've finally looked at the code in a bit more depth.  i still
know nothing about the i386 LDT checking and whatnot, but...

> There is a general change in sig_return(). When ever a process has
> something wrong in the returned sigcontext, a SIGBUS is sent instead
> of a "quiet" process exit.

i think that the way you do this is incorrect.

>   /*
> +  * Force a signal to a process
> +  */
> + void
> + force_signal(p, signal)
> + 	struct proc *p;

this shouldn't exist.  you shouldn't be mucking around with the
process's signal mask, nor should you be insisting that the signal
handler be the default one.

I think that you should trapsignal() a SIGBUS here, and
return EINVAL from the syscall.  (from the looks of the man page,
EINVAL is the most appropriate return code...)

that way:
	(1) the process will get it immediately, if they're accepting
		SIGBUSs.
	(2) if they get it, their handler will be called, if they set
		one, else the default one will be.
	(3) if they don't get it, EINVAL will be returned.  In the
		normal case, this would just cause the program to
		exit.  If they're blocking SIGBUS, so be it.  If
		they're calling "sigreturn" from their own return
		function, though, they can do something different
		if it returns...




chris
	
	

------------------------------------------------------------------------------