diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-24 14:00:48 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:00:33 -0500 |
commit | 07b053457b5faea05630c119baffa7c61c515fe4 (patch) | |
tree | b281b4da5cc45ee45f5136123d1fd2eaacbfe3c5 | |
parent | 0e65a81b105a3f646793d46740ad90fa5c067986 (diff) |
x86: sys32_kill and sys32_mprotect are pointless
their argument types are identical to those of sys_kill and sys_mprotect
resp., so we are not doing any kind of argument validation, etc. in those -
they turn into unconditional branches to corresponding syscalls.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/x86/ia32/sys_ia32.c | 11 | ||||
-rw-r--r-- | arch/x86/include/asm/sys_ia32.h | 2 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 4 |
3 files changed, 2 insertions, 15 deletions
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index c0df976b0b71..4e4907c67d92 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -166,12 +166,6 @@ asmlinkage long sys32_mmap(struct mmap_arg_struct32 __user *arg) | |||
166 | a.offset>>PAGE_SHIFT); | 166 | a.offset>>PAGE_SHIFT); |
167 | } | 167 | } |
168 | 168 | ||
169 | asmlinkage long sys32_mprotect(unsigned long start, size_t len, | ||
170 | unsigned long prot) | ||
171 | { | ||
172 | return sys_mprotect(start, len, prot); | ||
173 | } | ||
174 | |||
175 | asmlinkage long sys32_waitpid(compat_pid_t pid, unsigned int __user *stat_addr, | 169 | asmlinkage long sys32_waitpid(compat_pid_t pid, unsigned int __user *stat_addr, |
176 | int options) | 170 | int options) |
177 | { | 171 | { |
@@ -198,11 +192,6 @@ asmlinkage long sys32_pwrite(unsigned int fd, const char __user *ubuf, | |||
198 | * Some system calls that need sign extended arguments. This could be | 192 | * Some system calls that need sign extended arguments. This could be |
199 | * done by a generic wrapper. | 193 | * done by a generic wrapper. |
200 | */ | 194 | */ |
201 | long sys32_kill(int pid, int sig) | ||
202 | { | ||
203 | return sys_kill(pid, sig); | ||
204 | } | ||
205 | |||
206 | long sys32_fadvise64_64(int fd, __u32 offset_low, __u32 offset_high, | 195 | long sys32_fadvise64_64(int fd, __u32 offset_low, __u32 offset_high, |
207 | __u32 len_low, __u32 len_high, int advice) | 196 | __u32 len_low, __u32 len_high, int advice) |
208 | { | 197 | { |
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h index df8ad3b3920a..5e1724176626 100644 --- a/arch/x86/include/asm/sys_ia32.h +++ b/arch/x86/include/asm/sys_ia32.h | |||
@@ -30,7 +30,6 @@ asmlinkage long sys32_fstatat(unsigned int, const char __user *, | |||
30 | struct stat64 __user *, int); | 30 | struct stat64 __user *, int); |
31 | struct mmap_arg_struct32; | 31 | struct mmap_arg_struct32; |
32 | asmlinkage long sys32_mmap(struct mmap_arg_struct32 __user *); | 32 | asmlinkage long sys32_mmap(struct mmap_arg_struct32 __user *); |
33 | asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long); | ||
34 | 33 | ||
35 | asmlinkage long sys32_alarm(unsigned int); | 34 | asmlinkage long sys32_alarm(unsigned int); |
36 | 35 | ||
@@ -42,7 +41,6 @@ asmlinkage long sys32_pwrite(unsigned int, const char __user *, u32, u32, u32); | |||
42 | 41 | ||
43 | asmlinkage long sys32_personality(unsigned long); | 42 | asmlinkage long sys32_personality(unsigned long); |
44 | 43 | ||
45 | long sys32_kill(int, int); | ||
46 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); | 44 | long sys32_fadvise64_64(int, __u32, __u32, __u32, __u32, int); |
47 | long sys32_vm86_warning(void); | 45 | long sys32_vm86_warning(void); |
48 | 46 | ||
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 0f6f5becab0d..d0d59bfbccce 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -43,7 +43,7 @@ | |||
43 | 34 i386 nice sys_nice | 43 | 34 i386 nice sys_nice |
44 | 35 i386 ftime | 44 | 35 i386 ftime |
45 | 36 i386 sync sys_sync | 45 | 36 i386 sync sys_sync |
46 | 37 i386 kill sys_kill sys32_kill | 46 | 37 i386 kill sys_kill |
47 | 38 i386 rename sys_rename | 47 | 38 i386 rename sys_rename |
48 | 39 i386 mkdir sys_mkdir | 48 | 39 i386 mkdir sys_mkdir |
49 | 40 i386 rmdir sys_rmdir | 49 | 40 i386 rmdir sys_rmdir |
@@ -131,7 +131,7 @@ | |||
131 | 122 i386 uname sys_newuname | 131 | 122 i386 uname sys_newuname |
132 | 123 i386 modify_ldt sys_modify_ldt | 132 | 123 i386 modify_ldt sys_modify_ldt |
133 | 124 i386 adjtimex sys_adjtimex compat_sys_adjtimex | 133 | 124 i386 adjtimex sys_adjtimex compat_sys_adjtimex |
134 | 125 i386 mprotect sys_mprotect sys32_mprotect | 134 | 125 i386 mprotect sys_mprotect |
135 | 126 i386 sigprocmask sys_sigprocmask compat_sys_sigprocmask | 135 | 126 i386 sigprocmask sys_sigprocmask compat_sys_sigprocmask |
136 | 127 i386 create_module | 136 | 127 i386 create_module |
137 | 128 i386 init_module sys_init_module | 137 | 128 i386 init_module sys_init_module |