Re: 2.3.30pre1 syscall w/6 args support?

Brian Gerst (bgerst@quark.vpplus.com)
Wed, 08 Dec 1999 13:43:56 -0500


Ingo Molnar wrote:
> > The same is true of Wine: you just need to check the DS/SS segment values
> > on return (and if they are anything but USER_DS you need to use "iret"
> > again).
>
> whoops, nasty. I'm not quite sure how we could do this though - SYSENTER
> destroys CS and SS, so we have nothing to check ... Probably Wine has to
> use the old int $80 interface?

As far as I know, Wine currently only uses the extra segments for
Windows code. Any Linux syscalls should only be coming from the main
code segment.

I don't know about Intel's SYSENTER/SYSEXIT, but with AMD's
SYSCALL/SYSRET you cannot return to user space with iret after a
SYSCALL. The CPU sets an internal flag that causes a GPF when anything
modifies %cs except for SYSRET or an interrupt (hardware or software).
This has been a big stumbling block for me with adding SYSCALL support
becuase it interferes with task switching (ie. can't switch to another
task that would do an iret), unless it is restricted to syscalls that
cannot sleep.

--

Brian Gerst

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/