64-bit Application Support on the 64-bit Kernel
For the most part, system call parameters from a 64-bit application can be used directly by 64-bit system calls.
The system call handler does not modify the parameter registers, so the system call sees the same values that were passed by the application. The only exceptions are the pid_t and key_t types, which are 32-bit signed types in 64-bit applications, but are 64-bit signed types in 64-bit system calls. Before these two types can be used, the 32-bit parameter values must be sign extended using the LONG32TOLONG64 macro.