diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-24 10:52:26 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-24 10:52:26 -0500 |
commit | 561c6731978fa128f29342495f47fc3365898b3d (patch) | |
tree | 6adc3a961708c8ec2d8e3a52e80bf9421f866066 /arch | |
parent | aee41fe2b2468bd3276e8eecd36c3e75927e2c53 (diff) |
switch lseek to COMPAT_SYSCALL_DEFINE
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/unistd32.h | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/sys32.S | 5 | ||||
-rw-r--r-- | arch/parisc/kernel/sys_parisc32.c | 10 | ||||
-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 | 6 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sys32.S | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 2 | ||||
-rw-r--r-- | arch/x86/ia32/sys_ia32.c | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/sys_ia32.h | 1 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 |
13 files changed, 6 insertions, 40 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 | */ |
61 | compat_sys_lseek_wrapper: | ||
62 | sxtw x1, w1 | ||
63 | b sys_lseek | ||
64 | ENDPROC(compat_sys_lseek_wrapper) | ||
65 | |||
66 | compat_sys_pread64_wrapper: | 61 | compat_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 | |||
87 | asmlinkage int sys32_lseek(unsigned int fd, int offset, unsigned int origin) | ||
88 | { | ||
89 | return sys_lseek(fd, offset, origin); | ||
90 | } | ||
91 | |||
92 | asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg) | 82 | asmlinkage 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) | |||
22 | SYSCALL_SPU(lchown) | 22 | SYSCALL_SPU(lchown) |
23 | SYSCALL(ni_syscall) | 23 | SYSCALL(ni_syscall) |
24 | OLDSYS(stat) | 24 | OLDSYS(stat) |
25 | SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek) | 25 | COMPAT_SYS_SPU(lseek) |
26 | SYSCALL_SPU(getpid) | 26 | SYSCALL_SPU(getpid) |
27 | COMPAT_SYS(mount) | 27 | COMPAT_SYS(mount) |
28 | SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) | 28 | SYSX(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 | ||
149 | off_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 | |||
155 | long compat_sys_truncate(const char __user * path, u32 length) | 149 | long 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 | ||
70 | ENTRY(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 | ||
78 | ENTRY(sys32_mount_wrapper) | 72 | ENTRY(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 */ | |||
27 | SYSCALL(sys_lchown16,sys_ni_syscall,sys32_lchown16_wrapper) /* old lchown16 syscall*/ | 27 | SYSCALL(sys_lchown16,sys_ni_syscall,sys32_lchown16_wrapper) /* old lchown16 syscall*/ |
28 | NI_SYSCALL /* old break syscall holder */ | 28 | NI_SYSCALL /* old break syscall holder */ |
29 | NI_SYSCALL /* old stat syscall holder */ | 29 | NI_SYSCALL /* old stat syscall holder */ |
30 | SYSCALL(sys_lseek,sys_lseek,sys32_lseek_wrapper) | 30 | SYSCALL(sys_lseek,sys_lseek,compat_sys_lseek) |
31 | SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */ | 31 | SYSCALL(sys_getpid,sys_getpid,sys_getpid) /* 20 */ |
32 | SYSCALL(sys_mount,sys_mount,sys32_mount_wrapper) | 32 | SYSCALL(sys_mount,sys_mount,sys32_mount_wrapper) |
33 | SYSCALL(sys_oldumount,sys_oldumount,sys32_oldumount_wrapper) | 33 | SYSCALL(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) | |||
47 | SIGN1(sys32_select, compat_sys_select, %o0) | 47 | SIGN1(sys32_select, compat_sys_select, %o0) |
48 | SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) | 48 | SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) |
49 | SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1) | 49 | SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1) |
50 | SIGN1(sys32_lseek, sys_lseek, %o1) | ||
51 | SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) | 50 | SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) |
52 | SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) | 51 | SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) |
53 | SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0) | 52 | SIGN1(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 | */ |
221 | long sys32_lseek(unsigned int fd, int offset, unsigned int whence) | ||
222 | { | ||
223 | return sys_lseek(fd, offset, whence); | ||
224 | } | ||
225 | |||
226 | long sys32_kill(int pid, int sig) | 221 | long 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); | |||
43 | asmlinkage long sys32_personality(unsigned long); | 43 | asmlinkage long sys32_personality(unsigned long); |
44 | asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32); | 44 | asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32); |
45 | 45 | ||
46 | long sys32_lseek(unsigned int, int, unsigned int); | ||
47 | long sys32_kill(int, int); | 46 | long sys32_kill(int, int); |
48 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); | 47 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); |
49 | long sys32_vm86_warning(void); | 48 | long 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 @@ | |||
25 | 16 i386 lchown sys_lchown16 | 25 | 16 i386 lchown sys_lchown16 |
26 | 17 i386 break | 26 | 17 i386 break |
27 | 18 i386 oldstat sys_stat | 27 | 18 i386 oldstat sys_stat |
28 | 19 i386 lseek sys_lseek sys32_lseek | 28 | 19 i386 lseek sys_lseek compat_sys_lseek |
29 | 20 i386 getpid sys_getpid | 29 | 20 i386 getpid sys_getpid |
30 | 21 i386 mount sys_mount compat_sys_mount | 30 | 21 i386 mount sys_mount compat_sys_mount |
31 | 22 i386 umount sys_oldumount | 31 | 22 i386 umount sys_oldumount |