diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-25 18:42:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:00:23 -0500 |
commit | d5dc77bfeeab0b03a32e3db5e31e2f64605634ab (patch) | |
tree | 7cdf557d1310db607d164d576d8cc5799d4aaf36 /arch | |
parent | 76b021d053ed0b8de9689eefca5e8f53dade7fd7 (diff) |
consolidate compat lookup_dcookie()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kernel/sys32.S | 7 | ||||
-rw-r--r-- | arch/mips/kernel/linux32.c | 6 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/sys_parisc32.c | 7 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/systbl.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/sys_ppc32.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 7 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 2 | ||||
-rw-r--r-- | arch/tile/kernel/compat.c | 5 | ||||
-rw-r--r-- | arch/x86/ia32/sys_ia32.c | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/sys_ia32.h | 1 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 |
15 files changed, 6 insertions, 60 deletions
diff --git a/arch/arm64/kernel/sys32.S b/arch/arm64/kernel/sys32.S index 9416d045a687..db01aa978c41 100644 --- a/arch/arm64/kernel/sys32.S +++ b/arch/arm64/kernel/sys32.S | |||
@@ -84,13 +84,6 @@ compat_sys_readahead_wrapper: | |||
84 | b sys_readahead | 84 | b sys_readahead |
85 | ENDPROC(compat_sys_readahead_wrapper) | 85 | ENDPROC(compat_sys_readahead_wrapper) |
86 | 86 | ||
87 | compat_sys_lookup_dcookie: | ||
88 | orr x0, x0, x1, lsl #32 | ||
89 | mov w1, w2 | ||
90 | mov w2, w3 | ||
91 | b sys_lookup_dcookie | ||
92 | ENDPROC(compat_sys_lookup_dcookie) | ||
93 | |||
94 | compat_sys_fadvise64_64_wrapper: | 87 | compat_sys_fadvise64_64_wrapper: |
95 | mov w6, w1 | 88 | mov w6, w1 |
96 | orr x1, x2, x3, lsl #32 | 89 | orr x1, x2, x3, lsl #32 |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index b0cc2a7df59f..6852d4876f82 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -259,12 +259,6 @@ asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2, | |||
259 | merge_64(len_a4, len_a5)); | 259 | merge_64(len_a4, len_a5)); |
260 | } | 260 | } |
261 | 261 | ||
262 | asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | ||
263 | size_t len) | ||
264 | { | ||
265 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); | ||
266 | } | ||
267 | |||
268 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, | 262 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, |
269 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) | 263 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) |
270 | { | 264 | { |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index c1a70e805751..91c8c6ea7b09 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -439,7 +439,7 @@ sys_call_table: | |||
439 | PTR compat_sys_io_submit | 439 | PTR compat_sys_io_submit |
440 | PTR sys_io_cancel /* 4245 */ | 440 | PTR sys_io_cancel /* 4245 */ |
441 | PTR sys_exit_group | 441 | PTR sys_exit_group |
442 | PTR sys32_lookup_dcookie | 442 | PTR compat_sys_lookup_dcookie |
443 | PTR sys_epoll_create | 443 | PTR sys_epoll_create |
444 | PTR sys_epoll_ctl | 444 | PTR sys_epoll_ctl |
445 | PTR sys_epoll_wait /* 4250 */ | 445 | PTR sys_epoll_wait /* 4250 */ |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 035ab3f94814..46bdf6080fe4 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -75,13 +75,6 @@ asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg) | |||
75 | return sys_semctl (semid, semnum, cmd, arg); | 75 | return sys_semctl (semid, semnum, cmd, arg); |
76 | } | 76 | } |
77 | 77 | ||
78 | long sys32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char __user *buf, | ||
79 | size_t len) | ||
80 | { | ||
81 | return sys_lookup_dcookie((u64)cookie_high << 32 | cookie_low, | ||
82 | buf, len); | ||
83 | } | ||
84 | |||
85 | asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi, | 78 | asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi, |
86 | u32 mask_lo, int fd, | 79 | u32 mask_lo, int fd, |
87 | const char __user *pathname) | 80 | const char __user *pathname) |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index f232672a9e20..30c9a3bba1cc 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -318,7 +318,7 @@ | |||
318 | ENTRY_SAME(alloc_hugepages) /* 220 */ | 318 | ENTRY_SAME(alloc_hugepages) /* 220 */ |
319 | ENTRY_SAME(free_hugepages) | 319 | ENTRY_SAME(free_hugepages) |
320 | ENTRY_SAME(exit_group) | 320 | ENTRY_SAME(exit_group) |
321 | ENTRY_DIFF(lookup_dcookie) | 321 | ENTRY_COMP(lookup_dcookie) |
322 | ENTRY_SAME(epoll_create) | 322 | ENTRY_SAME(epoll_create) |
323 | ENTRY_SAME(epoll_ctl) /* 225 */ | 323 | ENTRY_SAME(epoll_ctl) /* 225 */ |
324 | ENTRY_SAME(epoll_wait) | 324 | ENTRY_SAME(epoll_wait) |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 634db7d2dc92..afef04d6ee52 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -239,7 +239,7 @@ SYSCALL_SPU(io_cancel) | |||
239 | SYSCALL(set_tid_address) | 239 | SYSCALL(set_tid_address) |
240 | SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) | 240 | SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) |
241 | SYSCALL(exit_group) | 241 | SYSCALL(exit_group) |
242 | SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie) | 242 | COMPAT_SYS(lookup_dcookie) |
243 | SYSCALL_SPU(epoll_create) | 243 | SYSCALL_SPU(epoll_create) |
244 | SYSCALL_SPU(epoll_ctl) | 244 | SYSCALL_SPU(epoll_ctl) |
245 | SYSCALL_SPU(epoll_wait) | 245 | SYSCALL_SPU(epoll_wait) |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 6e7c2509bd2d..e695230ca181 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -177,13 +177,6 @@ asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long h | |||
177 | return sys_ftruncate(fd, (high << 32) | low); | 177 | return sys_ftruncate(fd, (high << 32) | low); |
178 | } | 178 | } |
179 | 179 | ||
180 | long ppc32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char __user *buf, | ||
181 | size_t len) | ||
182 | { | ||
183 | return sys_lookup_dcookie((u64)cookie_high << 32 | cookie_low, | ||
184 | buf, len); | ||
185 | } | ||
186 | |||
187 | long ppc32_fadvise64(int fd, u32 unused, u32 offset_high, u32 offset_low, | 180 | long ppc32_fadvise64(int fd, u32 unused, u32 offset_high, u32 offset_low, |
188 | size_t len, int advice) | 181 | size_t len, int advice) |
189 | { | 182 | { |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 68117a3dd252..6d4958ea390b 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -926,13 +926,6 @@ ENTRY(sys_epoll_wait_wrapper) | |||
926 | lgfr %r5,%r5 # int | 926 | lgfr %r5,%r5 # int |
927 | jg sys_epoll_wait # branch to system call | 927 | jg sys_epoll_wait # branch to system call |
928 | 928 | ||
929 | ENTRY(sys32_lookup_dcookie_wrapper) | ||
930 | sllg %r2,%r2,32 # get high word of 64bit dcookie | ||
931 | or %r2,%r3 # get low word of 64bit dcookie | ||
932 | llgtr %r3,%r4 # char * | ||
933 | llgfr %r4,%r5 # size_t | ||
934 | jg sys_lookup_dcookie | ||
935 | |||
936 | ENTRY(sys32_fadvise64_wrapper) | 929 | ENTRY(sys32_fadvise64_wrapper) |
937 | lgfr %r2,%r2 # int | 930 | lgfr %r2,%r2 # int |
938 | sllg %r3,%r3,32 # get high word of 64bit loff_t | 931 | sllg %r3,%r3,32 # get high word of 64bit loff_t |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 102254a4397d..9154e17f25b9 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -118,7 +118,7 @@ SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper) | |||
118 | SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat_wrapper) | 118 | SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat_wrapper) |
119 | SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat_wrapper) | 119 | SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat_wrapper) |
120 | NI_SYSCALL /* old uname syscall */ | 120 | NI_SYSCALL /* old uname syscall */ |
121 | SYSCALL(sys_lookup_dcookie,sys_lookup_dcookie,sys32_lookup_dcookie_wrapper) /* 110 */ | 121 | SYSCALL(sys_lookup_dcookie,sys_lookup_dcookie,compat_sys_lookup_dcookie) /* 110 */ |
122 | SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) | 122 | SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) |
123 | NI_SYSCALL /* old "idle" system call */ | 123 | NI_SYSCALL /* old "idle" system call */ |
124 | NI_SYSCALL /* vm86old for i386 */ | 124 | NI_SYSCALL /* vm86old for i386 */ |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index f38f2280fade..5d4ee8374c84 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -303,14 +303,6 @@ long compat_sys_fadvise64_64(int fd, | |||
303 | advice); | 303 | advice); |
304 | } | 304 | } |
305 | 305 | ||
306 | long sys32_lookup_dcookie(unsigned long cookie_high, | ||
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) | 306 | 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 | { | 307 | { |
316 | return sys_sync_file_range(fd, | 308 | return sys_sync_file_range(fd, |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 46d575b6f696..8fd932080215 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -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 |
diff --git a/arch/tile/kernel/compat.c b/arch/tile/kernel/compat.c index 7f72401b4f45..c262a02d8efa 100644 --- a/arch/tile/kernel/compat.c +++ b/arch/tile/kernel/compat.c | |||
@@ -54,11 +54,6 @@ long compat_sys_pwrite64(unsigned int fd, char __user *ubuf, size_t count, | |||
54 | return sys_pwrite64(fd, ubuf, count, ((loff_t)high << 32) | low); | 54 | return sys_pwrite64(fd, ubuf, count, ((loff_t)high << 32) | low); |
55 | } | 55 | } |
56 | 56 | ||
57 | long compat_sys_lookup_dcookie(u32 low, u32 high, char __user *buf, size_t len) | ||
58 | { | ||
59 | return sys_lookup_dcookie(((loff_t)high << 32) | low, buf, len); | ||
60 | } | ||
61 | |||
62 | long compat_sys_sync_file_range2(int fd, unsigned int flags, | 57 | long compat_sys_sync_file_range2(int fd, unsigned int flags, |
63 | u32 offset_lo, u32 offset_hi, | 58 | u32 offset_lo, u32 offset_hi, |
64 | u32 nbytes_lo, u32 nbytes_hi) | 59 | u32 nbytes_lo, u32 nbytes_hi) |
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index ad6ca0472722..c0df976b0b71 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -226,12 +226,6 @@ long sys32_vm86_warning(void) | |||
226 | return -ENOSYS; | 226 | return -ENOSYS; |
227 | } | 227 | } |
228 | 228 | ||
229 | long sys32_lookup_dcookie(u32 addr_low, u32 addr_high, | ||
230 | char __user *buf, size_t len) | ||
231 | { | ||
232 | return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len); | ||
233 | } | ||
234 | |||
235 | asmlinkage ssize_t sys32_readahead(int fd, unsigned off_lo, unsigned off_hi, | 229 | asmlinkage ssize_t sys32_readahead(int fd, unsigned off_lo, unsigned off_hi, |
236 | size_t count) | 230 | size_t count) |
237 | { | 231 | { |
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h index 6d944e4bb524..2b0e0c2d5379 100644 --- a/arch/x86/include/asm/sys_ia32.h +++ b/arch/x86/include/asm/sys_ia32.h | |||
@@ -45,7 +45,6 @@ asmlinkage long sys32_personality(unsigned long); | |||
45 | long sys32_kill(int, int); | 45 | long sys32_kill(int, int); |
46 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); | 46 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); |
47 | long sys32_vm86_warning(void); | 47 | long sys32_vm86_warning(void); |
48 | long sys32_lookup_dcookie(u32, u32, char __user *, size_t); | ||
49 | 48 | ||
50 | asmlinkage ssize_t sys32_readahead(int, unsigned, unsigned, size_t); | 49 | asmlinkage ssize_t sys32_readahead(int, unsigned, unsigned, size_t); |
51 | asmlinkage long sys32_sync_file_range(int, unsigned, unsigned, | 50 | asmlinkage long sys32_sync_file_range(int, unsigned, unsigned, |
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 6a00b1257d68..0b55cd773e4c 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -259,7 +259,7 @@ | |||
259 | 250 i386 fadvise64 sys_fadvise64 sys32_fadvise64 | 259 | 250 i386 fadvise64 sys_fadvise64 sys32_fadvise64 |
260 | # 251 is available for reuse (was briefly sys_set_zone_reclaim) | 260 | # 251 is available for reuse (was briefly sys_set_zone_reclaim) |
261 | 252 i386 exit_group sys_exit_group | 261 | 252 i386 exit_group sys_exit_group |
262 | 253 i386 lookup_dcookie sys_lookup_dcookie sys32_lookup_dcookie | 262 | 253 i386 lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie |
263 | 254 i386 epoll_create sys_epoll_create | 263 | 254 i386 epoll_create sys_epoll_create |
264 | 255 i386 epoll_ctl sys_epoll_ctl | 264 | 255 i386 epoll_ctl sys_epoll_ctl |
265 | 256 i386 epoll_wait sys_epoll_wait | 265 | 256 i386 epoll_wait sys_epoll_wait |