[lkml]   [1997]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectNew SYSCALL instruction (was: Re: Call Gates)
[explanation about LDT desc's snipped]

> The way chosen for linux is a bit more hacky, but it has some advantages.
> Linux uses a user-triggered interrupt; the system call is an "int $80".
> I think it might be a bit slower, but it saves the flags automatically,
> allow all types of travels between rings, and this opcode is much smaller
> than the "call 0007:00000000" one (2 bytes vs 7).
> It also has the great characteristic of switching to a kernel stack, as it
> would be really BAD is the kernel had to rely on the user-level stack.

All newer pentiums & pro's, and the K5 and K6 have the newer SYSCALL/SYSRET
instructions: 2 byte opcode, and upon entry to the system only cs and the stack
are reloaded. This is very fast :-) Anyone looking into implementing this as
an alternative to int $80 in the linux kernel? A lot of syscalls can do without
to much protection :-)

btw, this instructions are described in detail in the K6 databook...

Segher Boessenkool, Arnhem, Holland

 \ /
  Last update: 2005-03-22 13:39    [W:0.044 / U:10.648 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site