Subject: Re: 2nd review of fixes to sig_return() and LDT's
To: Chris G. Demetriou <cgd@nobozo.CS.Berkeley.EDU>
From: John Brezak <brezak@apollo.hp.com>
List: port-i386
Date: 01/07/1994 23:58:01
>
>
> 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.
Should this be called in sendsig() then. This is where I got the idea...
>
> 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...
>
Even though it is most likely that a signal handler was the cause
of the error ? So I would invoke it again in this case ?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
John Brezak UUCP: uunet!apollo.hp!brezak
Hewlett Packard/Apollo Internet: brezak@ch.hp.com
300 Apollo Drive Phone: (508) 436-4915
Chelmsford, Massachusetts Fax: (508) 436-5103
------------------------------------------------------------------------------