I was wondering, what is the reason for having _syscall0 to _syscall6 in Linux to handle different number of parameters. Are there any security/performance issues with having just _syscall6 alone and letting calling code pass in null values for unused parameters?
A:
It is needed to decrease number of needed register copy and improve performance.
Each parameter needs to be moved form user's ABI into parameter-passing convention inside the kernel.
Also, some of such syscalls behaves differently with address parameters. But such conversion is needed on little number of archs.
osgx
2010-02-07 03:23:44