NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: MarisO on February 09, 2010, 03:10:13 PM
-
hi
I'd like to use sysenter instead of int 80h but I couldn't find any information on how to do it. Can you help me ?
-
Here is a decent document I found through Galileo:
http://www.cs.auckland.ac.nz/compsci215s2c/lectures/robert/lecture15.pdf
-
Is this with/for a 32-bit or 64-bit system?
-
32 bit
-
Here is a decent document I found through Galileo:
thanks that's what I need :-)
-
Still I don't get how to use SYSENTER. Can I use it in my code (in 32 bit Linux)?
I tried to use SYSENTER and the programm segfaults. I guess it is because CPU doesn't know where to return. Linux needs to set EDX and ECX before returning (via SYSEXIT), but what does it put in these registers ?
I can't set EDX and ECX myself because it would conflict with , for example, write file syscall.
mov eax,4
mov ebx,1
mov ecx,msgAddress
mov edx,msgLen
int 80h ; SYSENTER here segfaults
-
Read Sysenter Based System Call Mechanism in Linux 2.6 (http://articles.manugarg.com/systemcallinlinux2_6.html).