]> git.baikalelectronics.ru Git - kernel.git/commit
s390/compat: automatic zero, sign and pointer conversion of syscalls
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 1 Mar 2014 12:45:03 +0000 (13:45 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 4 Mar 2014 08:12:24 +0000 (09:12 +0100)
commit1bc5e0b4ec5d105cbbeda18c85e616299ec080c7
tree2bda879b8d746516dec33d6a12e1c0953b0fa21d
parentf121ac31fbb29e12eba5c10afee7743e75e15344
s390/compat: automatic zero, sign and pointer conversion of syscalls

Instead of explicitly changing compat system call parameters from e.g.
unsigned long to compat_ulong_t let the COMPAT_SYSCALL_WRAP macros
automatically detect (unsigned) long parameters and zero and sign
extend them automatically.
The resulting binary is completely identical.

In addition add a sys_[system call name] prototype for each system call
wrapper. This will cause compile errors if the prototype does not match
the prototype in include/linux/syscall.h.
Therefore we should now always get the correct zero and sign extension
of system call parameters. Pointers are handled like before.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/kernel/compat_wrap.c
include/linux/syscalls.h