diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-21 23:15:25 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:00:27 -0500 |
commit | 56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3 (patch) | |
tree | 62ede9a6cc31ed46d78632b65c4a66485fd5d1ad /arch/s390 | |
parent | d5dc77bfeeab0b03a32e3db5e31e2f64605634ab (diff) |
merge compat sys_ipc instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 44 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 1 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 8 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 |
4 files changed, 4 insertions, 51 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index fbd29c70a297..8b6e4f5288a2 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -288,51 +288,13 @@ asmlinkage long sys32_getegid16(void) | |||
288 | return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); | 288 | return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); |
289 | } | 289 | } |
290 | 290 | ||
291 | /* | ||
292 | * sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit emulation. | ||
293 | * | ||
294 | * This is really horribly ugly. | ||
295 | */ | ||
296 | #ifdef CONFIG_SYSVIPC | 291 | #ifdef CONFIG_SYSVIPC |
297 | asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr) | 292 | COMPAT_SYSCALL_DEFINE5(s390_ipc, uint, call, int, first, unsigned long, second, |
293 | unsigned long, third, compat_uptr_t, ptr) | ||
298 | { | 294 | { |
299 | if (call >> 16) /* hack for backward compatibility */ | 295 | if (call >> 16) /* hack for backward compatibility */ |
300 | return -EINVAL; | 296 | return -EINVAL; |
301 | switch (call) { | 297 | return compat_sys_ipc(call, first, second, third, ptr, third); |
302 | case SEMTIMEDOP: | ||
303 | return compat_sys_semtimedop(first, compat_ptr(ptr), | ||
304 | second, compat_ptr(third)); | ||
305 | case SEMOP: | ||
306 | /* struct sembuf is the same on 32 and 64bit :)) */ | ||
307 | return sys_semtimedop(first, compat_ptr(ptr), | ||
308 | second, NULL); | ||
309 | case SEMGET: | ||
310 | return sys_semget(first, second, third); | ||
311 | case SEMCTL: | ||
312 | return compat_sys_semctl(first, second, third, | ||
313 | compat_ptr(ptr)); | ||
314 | case MSGSND: | ||
315 | return compat_sys_msgsnd(first, second, third, | ||
316 | compat_ptr(ptr)); | ||
317 | case MSGRCV: | ||
318 | return compat_sys_msgrcv(first, second, 0, third, | ||
319 | 0, compat_ptr(ptr)); | ||
320 | case MSGGET: | ||
321 | return sys_msgget((key_t) first, second); | ||
322 | case MSGCTL: | ||
323 | return compat_sys_msgctl(first, second, compat_ptr(ptr)); | ||
324 | case SHMAT: | ||
325 | return compat_sys_shmat(first, second, third, | ||
326 | 0, compat_ptr(ptr)); | ||
327 | case SHMDT: | ||
328 | return sys_shmdt(compat_ptr(ptr)); | ||
329 | case SHMGET: | ||
330 | return sys_shmget(first, (unsigned)second, third); | ||
331 | case SHMCTL: | ||
332 | return compat_sys_shmctl(first, second, compat_ptr(ptr)); | ||
333 | } | ||
334 | |||
335 | return -ENOSYS; | ||
336 | } | 298 | } |
337 | #endif | 299 | #endif |
338 | 300 | ||
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index bce0b7aec8f9..976518c0592a 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -94,7 +94,6 @@ long sys32_getuid16(void); | |||
94 | long sys32_geteuid16(void); | 94 | long sys32_geteuid16(void); |
95 | long sys32_getgid16(void); | 95 | long sys32_getgid16(void); |
96 | long sys32_getegid16(void); | 96 | long sys32_getegid16(void); |
97 | long sys32_ipc(u32 call, int first, int second, int third, u32 ptr); | ||
98 | long sys32_truncate64(const char __user * path, unsigned long high, | 97 | long sys32_truncate64(const char __user * path, unsigned long high, |
99 | unsigned long low); | 98 | unsigned long low); |
100 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); | 99 | long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned long low); |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 6d4958ea390b..17644c8e10e1 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -388,14 +388,6 @@ ENTRY(compat_sys_sysinfo_wrapper) | |||
388 | llgtr %r2,%r2 # struct sysinfo_emu31 * | 388 | llgtr %r2,%r2 # struct sysinfo_emu31 * |
389 | jg compat_sys_sysinfo # branch to system call | 389 | jg compat_sys_sysinfo # branch to system call |
390 | 390 | ||
391 | ENTRY(sys32_ipc_wrapper) | ||
392 | llgfr %r2,%r2 # uint | ||
393 | lgfr %r3,%r3 # int | ||
394 | lgfr %r4,%r4 # int | ||
395 | lgfr %r5,%r5 # int | ||
396 | llgfr %r6,%r6 # u32 | ||
397 | jg sys32_ipc # branch to system call | ||
398 | |||
399 | ENTRY(sys32_fsync_wrapper) | 391 | ENTRY(sys32_fsync_wrapper) |
400 | llgfr %r2,%r2 # unsigned int | 392 | llgfr %r2,%r2 # unsigned int |
401 | jg sys_fsync # branch to system call | 393 | jg sys_fsync # branch to system call |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 9154e17f25b9..d2baabed7148 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -125,7 +125,7 @@ NI_SYSCALL /* vm86old for i386 */ | |||
125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) | 125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) |
126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ | 126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ |
127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) | 127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) |
128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,sys32_ipc_wrapper) | 128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) |
129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | 129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) |
130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) | 130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) |
131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ | 131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ |