Commit d4e82042c4cfa87a7d51710b71f568fe80132551

Authored by Heiko Carstens
1 parent 836f92adf1

[CVE-2009-0029] System call wrappers part 32

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Showing 7 changed files with 24 additions and 17 deletions Side-by-side Diff

... ... @@ -198,7 +198,7 @@
198 198 return file;
199 199 }
200 200  
201   -asmlinkage long sys_eventfd2(unsigned int count, int flags)
  201 +SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
202 202 {
203 203 int fd;
204 204 struct eventfd_ctx *ctx;
... ... @@ -228,7 +228,7 @@
228 228 return fd;
229 229 }
230 230  
231   -asmlinkage long sys_eventfd(unsigned int count)
  231 +SYSCALL_DEFINE1(eventfd, unsigned int, count)
232 232 {
233 233 return sys_eventfd2(count, 0);
234 234 }
... ... @@ -1043,7 +1043,7 @@
1043 1043 * sys_pipe() is the normal C calling standard for creating
1044 1044 * a pipe. It's not the way Unix traditionally does this, though.
1045 1045 */
1046   -asmlinkage long sys_pipe2(int __user *fildes, int flags)
  1046 +SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)
1047 1047 {
1048 1048 int fd[2];
1049 1049 int error;
... ... @@ -102,7 +102,8 @@
102 102 return -EFAULT;
103 103 }
104 104  
105   -asmlinkage long sys_old_readdir(unsigned int fd, struct old_linux_dirent __user * dirent, unsigned int count)
  105 +SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
  106 + struct old_linux_dirent __user *, dirent, unsigned int, count)
106 107 {
107 108 int error;
108 109 struct file * file;
... ... @@ -636,8 +636,9 @@
636 636 * which has a pointer to the sigset_t itself followed by a size_t containing
637 637 * the sigset size.
638 638 */
639   -asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp,
640   - fd_set __user *exp, struct timespec __user *tsp, void __user *sig)
  639 +SYSCALL_DEFINE6(pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp,
  640 + fd_set __user *, exp, struct timespec __user *, tsp,
  641 + void __user *, sig)
641 642 {
642 643 size_t sigsetsize = 0;
643 644 sigset_t __user *up = NULL;
... ... @@ -889,9 +890,9 @@
889 890 }
890 891  
891 892 #ifdef HAVE_SET_RESTORE_SIGMASK
892   -asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
893   - struct timespec __user *tsp, const sigset_t __user *sigmask,
894   - size_t sigsetsize)
  893 +SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
  894 + struct timespec __user *, tsp, const sigset_t __user *, sigmask,
  895 + size_t, sigsetsize)
895 896 {
896 897 sigset_t ksigmask, sigsaved;
897 898 struct timespec ts, end_time, *to = NULL;
... ... @@ -265,7 +265,7 @@
265 265 return 0;
266 266 }
267 267  
268   -asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr)
  268 +SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr)
269 269 {
270 270 struct file *file;
271 271 struct timerfd_ctx *ctx;
include/linux/syscalls.h
... ... @@ -678,6 +678,13 @@
678 678 asmlinkage long sys_eventfd2(unsigned int count, int flags);
679 679 asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
680 680 asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int);
  681 +asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *,
  682 + fd_set __user *, struct timespec __user *,
  683 + void __user *);
  684 +asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int,
  685 + struct timespec __user *, const sigset_t __user *,
  686 + size_t);
  687 +asmlinkage long sys_pipe2(int __user *, int);
681 688  
682 689 int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
683 690  
... ... @@ -2491,11 +2491,10 @@
2491 2491 #endif /* __ARCH_WANT_SYS_SIGPROCMASK */
2492 2492  
2493 2493 #ifdef __ARCH_WANT_SYS_RT_SIGACTION
2494   -asmlinkage long
2495   -sys_rt_sigaction(int sig,
2496   - const struct sigaction __user *act,
2497   - struct sigaction __user *oact,
2498   - size_t sigsetsize)
  2494 +SYSCALL_DEFINE4(rt_sigaction, int, sig,
  2495 + const struct sigaction __user *, act,
  2496 + struct sigaction __user *, oact,
  2497 + size_t, sigsetsize)
2499 2498 {
2500 2499 struct k_sigaction new_sa, old_sa;
2501 2500 int ret = -EINVAL;
... ... @@ -2578,7 +2577,7 @@
2578 2577 #endif
2579 2578  
2580 2579 #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
2581   -asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
  2580 +SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize)
2582 2581 {
2583 2582 sigset_t newset;
2584 2583