Re: 2.3.30pre1 syscall w/6 args support?

Linus Torvalds (torvalds@transmeta.com)
Wed, 8 Dec 1999 12:00:55 -0800 (PST)


On Wed, 8 Dec 1999, Ingo Molnar wrote:
>
> SS is destroyed and overwritten with the kernel SS by SYSENTER - i dont
> think we could get around that. Can we require user-space to save any
> potential fancy extra segments before doing a fastcall?

It's not destroyed if you just say "you can only use SYSENTER with the
standard SS and DS".

Then the SYSENTER code just builds a perfectly normal stack, EXACTLY as if
it was entered with a regular system call. Again, absolutely no special
cases. We just hardcode the return address (from the user stack), SS and
DS - exactly because they get destroyed by the instruction itself.

Then, the return path has the same stack regardless of whether it was
entered through a page fault, a old system call or a new system call. And
it always tries to return with SYSEXIT.

The problem with SYSEXIT is that it clobbers %edx and %ecx (or whatever -
I forget what the registers were and I'm too lazy to look them up), and
that makes it nasty to use for the generic case. But we'd have that user-
space fixup area..

Linus

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