3 ms·
Note that for modern x86 processors there are the fast systemcall instructions syscall/sysret (AMD64) and the older sysenter/sysexit. In contrast to int 80h, th
by aurelian15 10y ago
Note that for modern x86 processors there are the fast systemcall instructions syscall/sysret (AMD64) and the older sysenter/sysexit. In contrast to int 80h, those instructions do not bear the full interrupt overhead. I couldn't find this info anywhere on the website.
See e.g. [1] for a more comprehensive overview concerning the handling of system calls on Linux.
[1] http://blog.packagecloud.io/eng/2016/04/05/the-definitive-guide-to-linux-system-calls/ http://blog.packagecloud.io/eng/2016/04/05/the-definitive-gu...
- joshumax 10y agoFor those interested, Linux has a remarkably interesting way to determine whether to use the modern sysenter/sysexit routines or the ancient 0x80 interrupt vector. http://www.trilithium.com/johan/2005/08/linux-gate/ http://www.trilithium.com/johan/2005/08/linux-gate/ discuses the system quite nicely.
- deleted 10y ago[deleted]
- yuhong 10y agoSYSCALL/SYSRET is my favorite one, since it does not change ESP/RSP: http://web.archive.org/web/20120615223202/http://www.x86-64.org/pipermail/discuss/2000-October/001009.html http://web.archive.org/web/20120615223202/http://www.x86-64.... What is even worse is that I think Intel made the mistake of checking for canonical addresses and GP#ing on the SYSRET instruction itself.