Subject: Re: sigreturn()
To: None <mycroft@gnu.ai.mit.edu>
From: John Brezak <brezak@apollo.hp.com>
List: port-i386
Date: 01/11/1994 17:03:48
[ I really see another patch coming 'round... ]

>    I'd like to keep the sel== 0 check for now until I determine if this is a Wine
>    or Windows problem.
> 
> It's possible that WINE uses null selectors.  But we should not allow
> them for either cs or ds.
Right.

> 
>    The intent was to check these things:
> 
> Well, your code definitely doesn't get that right.
This is why I've really got to check my patch at home - sigh.

> 
>       Shouldn't there also be a way for (e.g.) WINE to remove a selector?
>       Currently there is not.
> 
>    [...]  I didn't find this API function in Mach or Linux though.
> 
> They may simply allow setting a LDT entry with the present bit off.  We
> really don't need an extra function.
How would one fiddle the LDT entry in order to turn off the present bit ?

> 
>    You can't add a LDT entry unless it the present bit is checked.
> 
> It doesn't matter.  You can still try to use an empty LDT slot, in which
> case you (once again) panic.  The chip is not happy loading segments with
> the present bit off.
Add this one to the checks...

> 
> 
> BTW, also note that if you allow removing selectors, you need to check if
> the selector is in use by the process and either fail the syscall or set
> the segment registers to the null selector.
> 
> (But again, if it's cs or ss, you need to trap.)
> 
I don't think removing LDT entries is needed at this point though.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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


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