aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2009-01-23 10:40:27 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-23 10:40:29 -0500
commite34a6280419a24297e6603075ac5af6ce9f13562 (patch)
treefe0c259274e9d57faa60930044edb39453e5e39b
parent179cb81aa1e9dc5444f678a6dd4dbb90c60322e1 (diff)
[S390] Add missing compat system call wrappers.
Add wrapper functions for the following compat system calls: * readahead * sendfile64 * tkill * tgkill * keyctl This ensures that the high order bits of the parameter registers are correctly sign extended. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--arch/s390/kernel/compat_wrapper.S38
-rw-r--r--arch/s390/kernel/syscalls.S10
2 files changed, 43 insertions, 5 deletions
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 6035cd20c7a7..62c706eb0de6 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1767,3 +1767,41 @@ sys_dup3_wrapper:
1767sys_epoll_create1_wrapper: 1767sys_epoll_create1_wrapper:
1768 lgfr %r2,%r2 # int 1768 lgfr %r2,%r2 # int
1769 jg sys_epoll_create1 # branch to system call 1769 jg sys_epoll_create1 # branch to system call
1770
1771 .globl sys32_readahead_wrapper
1772sys32_readahead_wrapper:
1773 lgfr %r2,%r2 # int
1774 llgfr %r3,%r3 # u32
1775 llgfr %r4,%r4 # u32
1776 lgfr %r5,%r5 # s32
1777 jg sys32_readahead # branch to system call
1778
1779 .globl sys32_sendfile64_wrapper
1780sys32_sendfile64_wrapper:
1781 lgfr %r2,%r2 # int
1782 lgfr %r3,%r3 # int
1783 llgtr %r4,%r4 # compat_loff_t *
1784 lgfr %r5,%r5 # s32
1785 jg sys32_sendfile64 # branch to system call
1786
1787 .globl sys_tkill_wrapper
1788sys_tkill_wrapper:
1789 lgfr %r2,%r2 # pid_t
1790 lgfr %r3,%r3 # int
1791 jg sys_tkill # branch to system call
1792
1793 .globl sys_tgkill_wrapper
1794sys_tgkill_wrapper:
1795 lgfr %r2,%r2 # pid_t
1796 lgfr %r3,%r3 # pid_t
1797 lgfr %r4,%r4 # int
1798 jg sys_tgkill # branch to system call
1799
1800 .globl compat_sys_keyctl_wrapper
1801compat_sys_keyctl_wrapper:
1802 llgfr %r2,%r2 # u32
1803 llgfr %r3,%r3 # u32
1804 llgfr %r4,%r4 # u32
1805 llgfr %r5,%r5 # u32
1806 llgfr %r6,%r6 # u32
1807 jg compat_sys_keyctl # branch to system call
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 3e18d8a5e614..fe5b25a988ab 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -230,8 +230,8 @@ SYSCALL(sys_mincore,sys_mincore,sys32_mincore_wrapper)
230SYSCALL(sys_madvise,sys_madvise,sys32_madvise_wrapper) 230SYSCALL(sys_madvise,sys_madvise,sys32_madvise_wrapper)
231SYSCALL(sys_getdents64,sys_getdents64,sys32_getdents64_wrapper) /* 220 */ 231SYSCALL(sys_getdents64,sys_getdents64,sys32_getdents64_wrapper) /* 220 */
232SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64_wrapper) 232SYSCALL(sys_fcntl64,sys_ni_syscall,compat_sys_fcntl64_wrapper)
233SYSCALL(sys_readahead,sys_readahead,sys32_readahead) 233SYSCALL(sys_readahead,sys_readahead,sys32_readahead_wrapper)
234SYSCALL(sys_sendfile64,sys_ni_syscall,sys32_sendfile64) 234SYSCALL(sys_sendfile64,sys_ni_syscall,sys32_sendfile64_wrapper)
235SYSCALL(sys_setxattr,sys_setxattr,sys32_setxattr_wrapper) 235SYSCALL(sys_setxattr,sys_setxattr,sys32_setxattr_wrapper)
236SYSCALL(sys_lsetxattr,sys_lsetxattr,sys32_lsetxattr_wrapper) /* 225 */ 236SYSCALL(sys_lsetxattr,sys_lsetxattr,sys32_lsetxattr_wrapper) /* 225 */
237SYSCALL(sys_fsetxattr,sys_fsetxattr,sys32_fsetxattr_wrapper) 237SYSCALL(sys_fsetxattr,sys_fsetxattr,sys32_fsetxattr_wrapper)
@@ -245,11 +245,11 @@ SYSCALL(sys_removexattr,sys_removexattr,sys32_removexattr_wrapper)
245SYSCALL(sys_lremovexattr,sys_lremovexattr,sys32_lremovexattr_wrapper) 245SYSCALL(sys_lremovexattr,sys_lremovexattr,sys32_lremovexattr_wrapper)
246SYSCALL(sys_fremovexattr,sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */ 246SYSCALL(sys_fremovexattr,sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */
247SYSCALL(sys_gettid,sys_gettid,sys_gettid) 247SYSCALL(sys_gettid,sys_gettid,sys_gettid)
248SYSCALL(sys_tkill,sys_tkill,sys_tkill) 248SYSCALL(sys_tkill,sys_tkill,sys_tkill_wrapper)
249SYSCALL(sys_futex,sys_futex,compat_sys_futex_wrapper) 249SYSCALL(sys_futex,sys_futex,compat_sys_futex_wrapper)
250SYSCALL(sys_sched_setaffinity,sys_sched_setaffinity,sys32_sched_setaffinity_wrapper) 250SYSCALL(sys_sched_setaffinity,sys_sched_setaffinity,sys32_sched_setaffinity_wrapper)
251SYSCALL(sys_sched_getaffinity,sys_sched_getaffinity,sys32_sched_getaffinity_wrapper) /* 240 */ 251SYSCALL(sys_sched_getaffinity,sys_sched_getaffinity,sys32_sched_getaffinity_wrapper) /* 240 */
252SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill) 252SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper)
253NI_SYSCALL /* reserved for TUX */ 253NI_SYSCALL /* reserved for TUX */
254SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper) 254SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper)
255SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper) 255SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper)
@@ -288,7 +288,7 @@ SYSCALL(sys_mq_getsetattr,sys_mq_getsetattr,compat_sys_mq_getsetattr_wrapper)
288SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load_wrapper) 288SYSCALL(sys_kexec_load,sys_kexec_load,compat_sys_kexec_load_wrapper)
289SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper) 289SYSCALL(sys_add_key,sys_add_key,compat_sys_add_key_wrapper)
290SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper) 290SYSCALL(sys_request_key,sys_request_key,compat_sys_request_key_wrapper)
291SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl) /* 280 */ 291SYSCALL(sys_keyctl,sys_keyctl,compat_sys_keyctl_wrapper) /* 280 */
292SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper) 292SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper)
293SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper) 293SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper)
294SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper) 294SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper)