diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 10:21:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 10:21:43 -0400 |
commit | 08d76760832993050ad8c25e63b56773ef2ca303 (patch) | |
tree | abdcf148dfe43cd49f30f204f1dac6978107a508 /arch/sparc/kernel | |
parent | 5f56886521d6ddd3648777fae44d82382dd8c87f (diff) | |
parent | 99e621f796d7f0341a51e8cdf32b81663b10b448 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull compat cleanup from Al Viro:
"Mostly about syscall wrappers this time; there will be another pile
with patches in the same general area from various people, but I'd
rather push those after both that and vfs.git pile are in."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
syscalls.h: slightly reduce the jungles of macros
get rid of union semop in sys_semctl(2) arguments
make do_mremap() static
sparc: no need to sign-extend in sync_file_range() wrapper
ppc compat wrappers for add_key(2) and request_key(2) are pointless
x86: trim sys_ia32.h
x86: sys32_kill and sys32_mprotect are pointless
get rid of compat_sys_semctl() and friends in case of ARCH_WANT_OLD_COMPAT_IPC
merge compat sys_ipc instances
consolidate compat lookup_dcookie()
convert vmsplice to COMPAT_SYSCALL_DEFINE
switch getrusage() to COMPAT_SYSCALL_DEFINE
switch epoll_pwait to COMPAT_SYSCALL_DEFINE
convert sendfile{,64} to COMPAT_SYSCALL_DEFINE
switch signalfd{,4}() to COMPAT_SYSCALL_DEFINE
make SYSCALL_DEFINE<n>-generated wrappers do asmlinkage_protect
make HAVE_SYSCALL_WRAPPERS unconditional
consolidate cond_syscall and SYSCALL_ALIAS declarations
teach SYSCALL_DEFINE<n> how to deal with long long/unsigned long long
get rid of duplicate logics in __SC_....[1-6] definitions
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/sys32.S | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 75 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc_64.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 8 |
4 files changed, 6 insertions, 87 deletions
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index 240a3cecc11e..2e680b5245c9 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
@@ -36,7 +36,6 @@ STUB: sra REG1, 0, REG1; \ | |||
36 | jmpl %g1 + %lo(SYSCALL), %g0; \ | 36 | jmpl %g1 + %lo(SYSCALL), %g0; \ |
37 | sra REG3, 0, REG3 | 37 | sra REG3, 0, REG3 |
38 | 38 | ||
39 | SIGN1(sys32_getrusage, compat_sys_getrusage, %o0) | ||
40 | SIGN1(sys32_readahead, compat_sys_readahead, %o0) | 39 | SIGN1(sys32_readahead, compat_sys_readahead, %o0) |
41 | SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4) | 40 | SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4) |
42 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) | 41 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) |
@@ -46,12 +45,9 @@ SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) | |||
46 | SIGN1(sys32_mq_open, compat_sys_mq_open, %o1) | 45 | SIGN1(sys32_mq_open, compat_sys_mq_open, %o1) |
47 | SIGN1(sys32_select, compat_sys_select, %o0) | 46 | SIGN1(sys32_select, compat_sys_select, %o0) |
48 | SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) | 47 | SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) |
49 | SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1) | ||
50 | SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) | 48 | SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) |
51 | SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) | 49 | SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) |
52 | SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0) | 50 | SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0) |
53 | SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5) | ||
54 | SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0) | ||
55 | 51 | ||
56 | .globl sys32_mmap2 | 52 | .globl sys32_mmap2 |
57 | sys32_mmap2: | 53 | sys32_mmap2: |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index f38f2280fade..3d0ddbc005fe 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -49,71 +49,6 @@ | |||
49 | #include <asm/mmu_context.h> | 49 | #include <asm/mmu_context.h> |
50 | #include <asm/compat_signal.h> | 50 | #include <asm/compat_signal.h> |
51 | 51 | ||
52 | #ifdef CONFIG_SYSVIPC | ||
53 | asmlinkage long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr, u32 fifth) | ||
54 | { | ||
55 | int version; | ||
56 | |||
57 | version = call >> 16; /* hack for backward compatibility */ | ||
58 | call &= 0xffff; | ||
59 | |||
60 | switch (call) { | ||
61 | case SEMTIMEDOP: | ||
62 | if (fifth) | ||
63 | /* sign extend semid */ | ||
64 | return compat_sys_semtimedop((int)first, | ||
65 | compat_ptr(ptr), second, | ||
66 | compat_ptr(fifth)); | ||
67 | /* else fall through for normal semop() */ | ||
68 | case SEMOP: | ||
69 | /* struct sembuf is the same on 32 and 64bit :)) */ | ||
70 | /* sign extend semid */ | ||
71 | return sys_semtimedop((int)first, compat_ptr(ptr), second, | ||
72 | NULL); | ||
73 | case SEMGET: | ||
74 | /* sign extend key, nsems */ | ||
75 | return sys_semget((int)first, (int)second, third); | ||
76 | case SEMCTL: | ||
77 | /* sign extend semid, semnum */ | ||
78 | return compat_sys_semctl((int)first, (int)second, third, | ||
79 | compat_ptr(ptr)); | ||
80 | |||
81 | case MSGSND: | ||
82 | /* sign extend msqid */ | ||
83 | return compat_sys_msgsnd((int)first, (int)second, third, | ||
84 | compat_ptr(ptr)); | ||
85 | case MSGRCV: | ||
86 | /* sign extend msqid, msgtyp */ | ||
87 | return compat_sys_msgrcv((int)first, second, (int)fifth, | ||
88 | third, version, compat_ptr(ptr)); | ||
89 | case MSGGET: | ||
90 | /* sign extend key */ | ||
91 | return sys_msgget((int)first, second); | ||
92 | case MSGCTL: | ||
93 | /* sign extend msqid */ | ||
94 | return compat_sys_msgctl((int)first, second, compat_ptr(ptr)); | ||
95 | |||
96 | case SHMAT: | ||
97 | /* sign extend shmid */ | ||
98 | return compat_sys_shmat((int)first, second, third, version, | ||
99 | compat_ptr(ptr)); | ||
100 | case SHMDT: | ||
101 | return sys_shmdt(compat_ptr(ptr)); | ||
102 | case SHMGET: | ||
103 | /* sign extend key_t */ | ||
104 | return sys_shmget((int)first, second, third); | ||
105 | case SHMCTL: | ||
106 | /* sign extend shmid */ | ||
107 | return compat_sys_shmctl((int)first, second, compat_ptr(ptr)); | ||
108 | |||
109 | default: | ||
110 | return -ENOSYS; | ||
111 | } | ||
112 | |||
113 | return -ENOSYS; | ||
114 | } | ||
115 | #endif | ||
116 | |||
117 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) | 52 | asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low) |
118 | { | 53 | { |
119 | if ((int)high < 0) | 54 | if ((int)high < 0) |
@@ -303,15 +238,7 @@ long compat_sys_fadvise64_64(int fd, | |||
303 | advice); | 238 | advice); |
304 | } | 239 | } |
305 | 240 | ||
306 | long sys32_lookup_dcookie(unsigned long cookie_high, | 241 | long sys32_sync_file_range(unsigned int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, unsigned int flags) |
307 | unsigned long cookie_low, | ||
308 | char __user *buf, size_t len) | ||
309 | { | ||
310 | return sys_lookup_dcookie((cookie_high << 32) | cookie_low, | ||
311 | buf, len); | ||
312 | } | ||
313 | |||
314 | long compat_sync_file_range(int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, int flags) | ||
315 | { | 242 | { |
316 | return sys_sync_file_range(fd, | 243 | return sys_sync_file_range(fd, |
317 | (off_high << 32) | off_low, | 244 | (off_high << 32) | off_low, |
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c index 708bc29d36a8..2daaaa6eda23 100644 --- a/arch/sparc/kernel/sys_sparc_64.c +++ b/arch/sparc/kernel/sys_sparc_64.c | |||
@@ -353,7 +353,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second | |||
353 | case SEMCTL: { | 353 | case SEMCTL: { |
354 | err = sys_semctl(first, second, | 354 | err = sys_semctl(first, second, |
355 | (int)third | IPC_64, | 355 | (int)third | IPC_64, |
356 | (union semun) ptr); | 356 | (unsigned long) ptr); |
357 | goto out; | 357 | goto out; |
358 | } | 358 | } |
359 | default: | 359 | default: |
@@ -470,10 +470,6 @@ SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len) | |||
470 | 470 | ||
471 | return vm_munmap(addr, len); | 471 | return vm_munmap(addr, len); |
472 | } | 472 | } |
473 | |||
474 | extern unsigned long do_mremap(unsigned long addr, | ||
475 | unsigned long old_len, unsigned long new_len, | ||
476 | unsigned long flags, unsigned long new_addr); | ||
477 | 473 | ||
478 | SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len, | 474 | SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len, |
479 | unsigned long, new_len, unsigned long, flags, | 475 | unsigned long, new_len, unsigned long, flags, |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 088134834dab..8fd932080215 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -23,9 +23,9 @@ sys_call_table32: | |||
23 | /*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod | 23 | /*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod |
24 | /*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, compat_sys_lseek | 24 | /*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, compat_sys_lseek |
25 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 | 25 | /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 |
26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, compat_sys_sigaltstack, sys_pause | 26 | /*25*/ .word compat_sys_vmsplice, compat_sys_ptrace, sys_alarm, compat_sys_sigaltstack, sys_pause |
27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice | 27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice |
28 | .word sys_chown, sys_sync, sys_kill, compat_sys_newstat, sys32_sendfile | 28 | .word sys_chown, sys_sync, sys_kill, compat_sys_newstat, compat_sys_sendfile |
29 | /*40*/ .word compat_sys_newlstat, sys_dup, sys_sparc_pipe, compat_sys_times, sys_getuid | 29 | /*40*/ .word compat_sys_newlstat, sys_dup, sys_sparc_pipe, compat_sys_times, sys_getuid |
30 | .word sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16 | 30 | .word sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16 |
31 | /*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl | 31 | /*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl |
@@ -41,7 +41,7 @@ sys_call_table32: | |||
41 | /*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending | 41 | /*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending |
42 | .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid | 42 | .word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid |
43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 43 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
44 | .word sys_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 44 | .word sys_getgroups, compat_sys_gettimeofday, compat_sys_getrusage, sys_nis_syscall, sys_getcwd |
45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod | 45 | /*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod |
46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate | 46 | .word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate |
47 | /*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall | 47 | /*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall |
@@ -59,7 +59,7 @@ sys_call_table32: | |||
59 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 59 | /*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
60 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, compat_sys_sparc_sigaction, sys_sgetmask | 60 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, compat_sys_sparc_sigaction, sys_sgetmask |
61 | /*200*/ .word sys_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir | 61 | /*200*/ .word sys_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir |
62 | .word sys32_readahead, sys32_socketcall, sys_syslog, sys32_lookup_dcookie, sys32_fadvise64 | 62 | .word sys32_readahead, sys32_socketcall, sys_syslog, compat_sys_lookup_dcookie, sys32_fadvise64 |
63 | /*210*/ .word sys32_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo | 63 | /*210*/ .word sys32_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo |
64 | .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys_ioprio_get, compat_sys_adjtimex | 64 | .word compat_sys_ipc, sys32_sigreturn, sys_clone, sys_ioprio_get, compat_sys_adjtimex |
65 | /*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid | 65 | /*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid |