[lkml]   [1998]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Differences between FreeBSD and Linux system call mechanism
Followup to:  <>
By author: "Brandon S. Allbery KF8NH" <>
In newsgroup:
> Amazing how Intel has so many ways to handle entry to privileged "contexts"
> that people easily get confused... yet all of them seem to lose in one
> fashion or another. Makes me wonder who they ripped the new "sysenter" off
> from. :-) (And how *it* will manage to lose, aside from the nonexistent
> backward compatibility.)

It loses because it throws away %eip and %esp, requiring those values
to be saved in user space, and giving you no indication where you came
from. Oh yes, and it loses because it works from V86 mode, with no
way to tell you were coming from V86 mode and hence shouldn't execute
arbitrary system calls. The only way around that is to zero the
SYSENTER MSR *in the scheduler*, slowing down a common path because
you can't put a needed test in an uncommon path.

(Actually, there is a better alternative: the vm86() system call
should set a flag in the process structure, and the signal handlers
should clear it; if you get a SYSENTER with the flag set you know you
were in V86 mode. Note that since %cs, %ss, %eip and %esp are
irrecoverably lost, all you can do is shut the V86 process down, or
emulate an 8086 reset.)


PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See for web page and full PGP public key
I am Bahá'í -- ask me about it or see
"To love another person is to see the face of God." -- Les Misérables

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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