3 Nov 2007 12:28
syscall() system call stub
David Laight <david <at> l8s.co.uk>
2007-11-03 11:28:11 GMT
2007-11-03 11:28:11 GMT
The amd64 stub for syscall() is: ENTRY(syscall) movl %edi,%eax syscall (from libc/arch/x86_64/sys/syscall.S) This looks completely wrong to me. I think it needs to be: mov $0,%eax mov %rcx,%r10 syscall probably generated by RSYSCALL(syscall) I actually suspect there are no actual calls to it in the amd64 userspace. Which is rather fortunate since there are calls lurking like: syscall(SYS___syscall, SYS_foo, args) which really isn't going to DTRT unless syscall() is implemented in the library - which it cannot be for some architectures like amd64 (& sparc) where some, but not all, of the system call arguments are passed in registers. David -- -- David Laight: david <at> l8s.co.uk(Continue reading)
RSS Feed