aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/include/asm/unistd32.h2
-rw-r--r--arch/arm64/kernel/sys32.S5
-rw-r--r--arch/parisc/kernel/sys_parisc32.c10
-rw-r--r--arch/parisc/kernel/syscall_table.S2
-rw-r--r--arch/powerpc/include/asm/systbl.h2
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c6
-rw-r--r--arch/s390/kernel/compat_wrapper.S6
-rw-r--r--arch/s390/kernel/syscalls.S2
-rw-r--r--arch/sparc/kernel/sys32.S1
-rw-r--r--arch/sparc/kernel/systbls_64.S2
-rw-r--r--arch/x86/ia32/sys_ia32.c5
-rw-r--r--arch/x86/include/asm/sys_ia32.h1
-rw-r--r--arch/x86/syscalls/syscall_32.tbl2
-rw-r--r--fs/read_write.c9
-rw-r--r--include/linux/compat.h1
15 files changed, 15 insertions, 41 deletions
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
index e60e386178d1..8153f1a43f0a 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -40,7 +40,7 @@ __SYSCALL(15, sys_chmod)
40__SYSCALL(16, sys_lchown16) 40__SYSCALL(16, sys_lchown16)
41__SYSCALL(17, sys_ni_syscall) /* 17 was sys_break */ 41__SYSCALL(17, sys_ni_syscall) /* 17 was sys_break */
42__SYSCALL(18, sys_ni_syscall) /* 18 was sys_stat */ 42__SYSCALL(18, sys_ni_syscall) /* 18 was sys_stat */
43__SYSCALL(19, compat_sys_lseek_wrapper) 43__SYSCALL(19, compat_sys_lseek)
44__SYSCALL(20, sys_getpid) 44__SYSCALL(20, sys_getpid)
45__SYSCALL(21, compat_sys_mount) 45__SYSCALL(21, compat_sys_mount)
46__SYSCALL(22, sys_ni_syscall) /* 22 was sys_umount */ 46__SYSCALL(22, sys_ni_syscall) /* 22 was sys_umount */
diff --git a/arch/arm64/kernel/sys32.S b/arch/arm64/kernel/sys32.S
index 6abb05721614..9416d045a687 100644
--- a/arch/arm64/kernel/sys32.S
+++ b/arch/arm64/kernel/sys32.S
@@ -58,11 +58,6 @@ ENDPROC(compat_sys_fstatfs64_wrapper)
58 * in registers or that take 32-bit parameters which require sign 58 * in registers or that take 32-bit parameters which require sign
59 * extension. 59 * extension.
60 */ 60 */
61compat_sys_lseek_wrapper:
62 sxtw x1, w1
63 b sys_lseek
64ENDPROC(compat_sys_lseek_wrapper)
65
66compat_sys_pread64_wrapper: 61compat_sys_pread64_wrapper:
67 orr x3, x4, x5, lsl #32 62 orr x3, x4, x5, lsl #32
68 b sys_pread64 63 b sys_pread64
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index eca69bb8ef5f..051c8b90231f 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -79,16 +79,6 @@ asmlinkage long sys32_sendfile64(u32 out_fd, u32 in_fd,
79 (loff_t __user *)offset, count); 79 (loff_t __user *)offset, count);
80} 80}
81 81
82
83/* lseek() needs a wrapper because 'offset' can be negative, but the top
84 * half of the argument has been zeroed by syscall.S.
85 */
86
87asmlinkage int sys32_lseek(unsigned int fd, int offset, unsigned int origin)
88{
89 return sys_lseek(fd, offset, origin);
90}
91
92asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg) 82asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg)
93{ 83{
94 union semun u; 84 union semun u;
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index fc9cab1cc2df..d0efc0aeb612 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -76,7 +76,7 @@
76 ENTRY_SAME(socket) 76 ENTRY_SAME(socket)
77 /* struct stat is MAYBE identical wide and narrow ?? */ 77 /* struct stat is MAYBE identical wide and narrow ?? */
78 ENTRY_COMP(newstat) 78 ENTRY_COMP(newstat)
79 ENTRY_DIFF(lseek) 79 ENTRY_COMP(lseek)
80 ENTRY_SAME(getpid) /* 20 */ 80 ENTRY_SAME(getpid) /* 20 */
81 /* the 'void * data' parameter may need re-packing in wide */ 81 /* the 'void * data' parameter may need re-packing in wide */
82 ENTRY_COMP(mount) 82 ENTRY_COMP(mount)
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index d906f33441c6..535b6d8a41cc 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -22,7 +22,7 @@ SYSCALL_SPU(chmod)
22SYSCALL_SPU(lchown) 22SYSCALL_SPU(lchown)
23SYSCALL(ni_syscall) 23SYSCALL(ni_syscall)
24OLDSYS(stat) 24OLDSYS(stat)
25SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek) 25COMPAT_SYS_SPU(lseek)
26SYSCALL_SPU(getpid) 26SYSCALL_SPU(getpid)
27COMPAT_SYS(mount) 27COMPAT_SYS(mount)
28SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) 28SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index dbc44ba5b078..5677a36f450b 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -146,12 +146,6 @@ asmlinkage long compat_sys_sendfile64_wrapper(u32 out_fd, u32 in_fd,
146 (off_t __user *)offset, count); 146 (off_t __user *)offset, count);
147} 147}
148 148
149off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin)
150{
151 /* sign extend n */
152 return sys_lseek(fd, (int)offset, origin);
153}
154
155long compat_sys_truncate(const char __user * path, u32 length) 149long compat_sys_truncate(const char __user * path, u32 length)
156{ 150{
157 /* sign extend length */ 151 /* sign extend length */
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index c14faf39ae36..2b1a3a03244f 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -67,12 +67,6 @@ ENTRY(sys32_lchown16_wrapper)
67 llgfr %r4,%r4 # __kernel_old_uid_emu31_t 67 llgfr %r4,%r4 # __kernel_old_uid_emu31_t
68 jg sys32_lchown16 # branch to system call 68 jg sys32_lchown16 # branch to system call
69 69
70ENTRY(sys32_lseek_wrapper)
71 llgfr %r2,%r2 # unsigned int
72 lgfr %r3,%r3 # off_t
73 llgfr %r4,%r4 # unsigned int
74 jg sys_lseek # branch to system call
75
76#sys32_getpid_wrapper # void 70#sys32_getpid_wrapper # void
77 71
78ENTRY(sys32_mount_wrapper) 72ENTRY(sys32_mount_wrapper)
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index aaac708aa110..0e5262f01007 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -27,7 +27,7 @@ SYSCALL(sys_chmod,sys_chmod,sys32_chmod_wrapper) /* 15 */
27SYSCALL(sys_lchown16,sys_ni_syscall,sys32_lchown16_wrapper) /* old lchown16 syscall*/ 27SYSCALL(sys_lchown16,sys_ni_syscall,sys32_lchown16_wrapper) /* old lchown16 syscall*/
28NI_SYSCALL /* old break syscall holder */ 28NI_SYSCALL /* old break syscall holder */
29NI_SYSCALL /* old stat syscall holder */ 29NI_SYSCALL /* old stat syscall holder */
30SYSCALL(sys_lseek,sys_lseek,sys32_lseek_wrapper) 30SYSCALL(sys_lseek,sys_lseek,compat_sys_lseek)
31SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */ 31SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */
32SYSCALL(sys_mount,sys_mount,sys32_mount_wrapper) 32SYSCALL(sys_mount,sys_mount,sys32_mount_wrapper)
33SYSCALL(sys_oldumount,sys_oldumount,sys32_oldumount_wrapper) 33SYSCALL(sys_oldumount,sys_oldumount,sys32_oldumount_wrapper)
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S
index 0cfe219646e3..be3d65a3c270 100644
--- a/arch/sparc/kernel/sys32.S
+++ b/arch/sparc/kernel/sys32.S
@@ -47,7 +47,6 @@ SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
47SIGN1(sys32_select, compat_sys_select, %o0) 47SIGN1(sys32_select, compat_sys_select, %o0)
48SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) 48SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
49SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1) 49SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1)
50SIGN1(sys32_lseek, sys_lseek, %o1)
51SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) 50SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
52SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) 51SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
53SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0) 52SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index 6eed1945a2cd..9ed517c5037b 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -21,7 +21,7 @@ sys_call_table32:
21/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write 21/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
22/*5*/ .word compat_sys_open, sys_close, compat_sys_wait4, sys_creat, sys_link 22/*5*/ .word compat_sys_open, sys_close, compat_sys_wait4, sys_creat, sys_link
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, sys32_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 sys32_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
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
index 592f5a9a9c0e..ad7a20cbc699 100644
--- a/arch/x86/ia32/sys_ia32.c
+++ b/arch/x86/ia32/sys_ia32.c
@@ -218,11 +218,6 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
218 * Some system calls that need sign extended arguments. This could be 218 * Some system calls that need sign extended arguments. This could be
219 * done by a generic wrapper. 219 * done by a generic wrapper.
220 */ 220 */
221long sys32_lseek(unsigned int fd, int offset, unsigned int whence)
222{
223 return sys_lseek(fd, offset, whence);
224}
225
226long sys32_kill(int pid, int sig) 221long sys32_kill(int pid, int sig)
227{ 222{
228 return sys_kill(pid, sig); 223 return sys_kill(pid, sig);
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
index 0218d917f509..8459efc39686 100644
--- a/arch/x86/include/asm/sys_ia32.h
+++ b/arch/x86/include/asm/sys_ia32.h
@@ -43,7 +43,6 @@ asmlinkage long sys32_pwrite(unsigned int, const char __user *, u32, u32, u32);
43asmlinkage long sys32_personality(unsigned long); 43asmlinkage long sys32_personality(unsigned long);
44asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32); 44asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32);
45 45
46long sys32_lseek(unsigned int, int, unsigned int);
47long sys32_kill(int, int); 46long sys32_kill(int, int);
48long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); 47long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int);
49long sys32_vm86_warning(void); 48long sys32_vm86_warning(void);
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
index f2fe78ff22cc..f51810be1a32 100644
--- a/arch/x86/syscalls/syscall_32.tbl
+++ b/arch/x86/syscalls/syscall_32.tbl
@@ -25,7 +25,7 @@
2516 i386 lchown sys_lchown16 2516 i386 lchown sys_lchown16
2617 i386 break 2617 i386 break
2718 i386 oldstat sys_stat 2718 i386 oldstat sys_stat
2819 i386 lseek sys_lseek sys32_lseek 2819 i386 lseek sys_lseek compat_sys_lseek
2920 i386 getpid sys_getpid 2920 i386 getpid sys_getpid
3021 i386 mount sys_mount compat_sys_mount 3021 i386 mount sys_mount compat_sys_mount
3122 i386 umount sys_oldumount 3122 i386 umount sys_oldumount
diff --git a/fs/read_write.c b/fs/read_write.c
index bb34af315280..e57796cb7b59 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -15,6 +15,7 @@
15#include <linux/syscalls.h> 15#include <linux/syscalls.h>
16#include <linux/pagemap.h> 16#include <linux/pagemap.h>
17#include <linux/splice.h> 17#include <linux/splice.h>
18#include <linux/compat.h>
18#include "read_write.h" 19#include "read_write.h"
19 20
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
@@ -247,6 +248,13 @@ SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, whence)
247 return retval; 248 return retval;
248} 249}
249 250
251#ifdef CONFIG_COMPAT
252COMPAT_SYSCALL_DEFINE3(lseek, unsigned int, fd, compat_off_t, offset, unsigned int, whence)
253{
254 return sys_lseek(fd, offset, whence);
255}
256#endif
257
250#ifdef __ARCH_WANT_SYS_LLSEEK 258#ifdef __ARCH_WANT_SYS_LLSEEK
251SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, 259SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
252 unsigned long, offset_low, loff_t __user *, result, 260 unsigned long, offset_low, loff_t __user *, result,
@@ -278,7 +286,6 @@ out_putf:
278} 286}
279#endif 287#endif
280 288
281
282/* 289/*
283 * rw_verify_area doesn't like huge counts. We limit 290 * rw_verify_area doesn't like huge counts. We limit
284 * them to something that fits in "int" so that others 291 * them to something that fits in "int" so that others
diff --git a/include/linux/compat.h b/include/linux/compat.h
index de095b0462a7..59c72048bf20 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -359,6 +359,7 @@ asmlinkage ssize_t compat_sys_preadv(unsigned long fd,
359asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, 359asmlinkage ssize_t compat_sys_pwritev(unsigned long fd,
360 const struct compat_iovec __user *vec, 360 const struct compat_iovec __user *vec,
361 unsigned long vlen, u32 pos_low, u32 pos_high); 361 unsigned long vlen, u32 pos_low, u32 pos_high);
362asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int);
362 363
363asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, 364asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv,
364 const compat_uptr_t __user *envp); 365 const compat_uptr_t __user *envp);