problem with our syscall() implementation
glibc provides an interface to call a system call from userspace directly using the syscall() function. The glibc exported interface for syscall() is variadic (int syscall(int sysno, ...))
for hppa, the implementation has this prototype:
int syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
one problem with this is that one cannot reliably pass 64-bit values into the kernel. for example, if i want to call a syscall with this signature:
sys_foo(uint64_t x, int y, int z)
(let's say sys_foo has syscall number 300)
the x argument does not end up in arg0... instead it seems to be spread across arg1 and arg2 (because of register alignment, i suppose)
is there any way to write syscall() so that we can pass 64-bit values reliably?
randolph
Signature · 3 lines
Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/