[pso] "ret" & "syscall_number" in EAX !

Bogdan Ardeleanu bogdanardeleanu at gmail.com
Thu Mar 16 20:51:34 EET 2006


"Simply entering kernel-space alone is not sufficient because there are multiple system calls, all of which enter the kernel in the same manner. Thus, the system call number must be passed into the kernel. On x86, the syscall number is fed to the kernel via the eax register. Before causing the trap into the kernel, user-space sticks in eax the number corresponding to the desired system call. The system call handler then reads the value from eax."


[...]


"The return value is sent to user-space also via register. On x86, it is written into the eax register."

      Linux Kernel Development Second Edition 
      By Robert Love 



INTREBARE: Cand pot scoate din struct pt_regs numarul apelului de sistem si cand returnul apelului de system?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20060316/bbd7c570/attachment.html


More information about the pso mailing list