I am trying to continue the work started by DavidXu on implemention of fast
syscalls via sysenter/sysexit.
http://people.freebsd.org/~davidxu/sysenter/kernel/ I have ported it on FreeBSD9. It looks like it works. Unfortunately I am a
beginner in kernel so I have some questions:
What is the reason why we have to do this additional check? In
http://people.freebsd.org/~davidxu/sysenter/kernel/sysenter.s we store %edx to the stack in
pushl %edx /* ring 3 next %eip */
and we restore the register in
popl %edx /* ring 3 %eip */