aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:14:34 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:31 -0500
commitd4e82042c4cfa87a7d51710b71f568fe80132551 (patch)
tree202c311b52f4e4db9fbbbd80607744e2aa2e5885
parent836f92adf121f806e9beb5b6b88bd5c9c4ea3f24 (diff)
[CVE-2009-0029] System call wrappers part 32
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--fs/eventfd.c5
-rw-r--r--fs/pipe.c2
-rw-r--r--fs/readdir.c3
-rw-r--r--fs/select.c11
-rw-r--r--fs/timerfd.c2
-rw-r--r--include/linux/syscalls.h7
-rw-r--r--kernel/signal.c11
7 files changed, 24 insertions, 17 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 08bf558d0408..5de2c2db3aa2 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -198,7 +198,7 @@ struct file *eventfd_fget(int fd)
198 return file; 198 return file;
199} 199}
200 200
201asmlinkage long sys_eventfd2(unsigned int count, int flags) 201SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags)
202{ 202{
203 int fd; 203 int fd;
204 struct eventfd_ctx *ctx; 204 struct eventfd_ctx *ctx;
@@ -228,8 +228,7 @@ asmlinkage long sys_eventfd2(unsigned int count, int flags)
228 return fd; 228 return fd;
229} 229}
230 230
231asmlinkage long sys_eventfd(unsigned int count) 231SYSCALL_DEFINE1(eventfd, unsigned int, count)
232{ 232{
233 return sys_eventfd2(count, 0); 233 return sys_eventfd2(count, 0);
234} 234}
235
diff --git a/fs/pipe.c b/fs/pipe.c
index 0c64db86c919..b89c878588a9 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1043,7 +1043,7 @@ int do_pipe(int *fd)
1043 * sys_pipe() is the normal C calling standard for creating 1043 * sys_pipe() is the normal C calling standard for creating
1044 * a pipe. It's not the way Unix traditionally does this, though. 1044 * a pipe. It's not the way Unix traditionally does this, though.
1045 */ 1045 */
1046asmlinkage long sys_pipe2(int __user *fildes, int flags) 1046SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)
1047{ 1047{
1048 int fd[2]; 1048 int fd[2];
1049 int error; 1049 int error;
diff --git a/fs/readdir.c b/fs/readdir.c
index cf6a0e39819a..7723401f8d8b 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -102,7 +102,8 @@ efault:
102 return -EFAULT; 102 return -EFAULT;
103} 103}
104 104
105asmlinkage long sys_old_readdir(unsigned int fd, struct old_linux_dirent __user * dirent, unsigned int count) 105SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
106 struct old_linux_dirent __user *, dirent, unsigned int, count)
106{ 107{
107 int error; 108 int error;
108 struct file * file; 109 struct file * file;
diff --git a/fs/select.c b/fs/select.c
index 338f703403af..0fe0e1469df3 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -636,8 +636,9 @@ static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp,
636 * which has a pointer to the sigset_t itself followed by a size_t containing 636 * which has a pointer to the sigset_t itself followed by a size_t containing
637 * the sigset size. 637 * the sigset size.
638 */ 638 */
639asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, 639SYSCALL_DEFINE6(pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp,
640 fd_set __user *exp, struct timespec __user *tsp, void __user *sig) 640 fd_set __user *, exp, struct timespec __user *, tsp,
641 void __user *, sig)
641{ 642{
642 size_t sigsetsize = 0; 643 size_t sigsetsize = 0;
643 sigset_t __user *up = NULL; 644 sigset_t __user *up = NULL;
@@ -889,9 +890,9 @@ SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds,
889} 890}
890 891
891#ifdef HAVE_SET_RESTORE_SIGMASK 892#ifdef HAVE_SET_RESTORE_SIGMASK
892asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, 893SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
893 struct timespec __user *tsp, const sigset_t __user *sigmask, 894 struct timespec __user *, tsp, const sigset_t __user *, sigmask,
894 size_t sigsetsize) 895 size_t, sigsetsize)
895{ 896{
896 sigset_t ksigmask, sigsaved; 897 sigset_t ksigmask, sigsaved;
897 struct timespec ts, end_time, *to = NULL; 898 struct timespec ts, end_time, *to = NULL;
diff --git a/fs/timerfd.c b/fs/timerfd.c
index c8c14f58b96f..6a123b8ff3f5 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -265,7 +265,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags,
265 return 0; 265 return 0;
266} 266}
267 267
268asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr) 268SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr)
269{ 269{
270 struct file *file; 270 struct file *file;
271 struct timerfd_ctx *ctx; 271 struct timerfd_ctx *ctx;
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 90aa5eba87a2..56c400138b05 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -678,6 +678,13 @@ asmlinkage long sys_eventfd(unsigned int count);
678asmlinkage long sys_eventfd2(unsigned int count, int flags); 678asmlinkage long sys_eventfd2(unsigned int count, int flags);
679asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); 679asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
680asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); 680asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int);
681asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *,
682 fd_set __user *, struct timespec __user *,
683 void __user *);
684asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int,
685 struct timespec __user *, const sigset_t __user *,
686 size_t);
687asmlinkage long sys_pipe2(int __user *, int);
681 688
682int kernel_execve(const char *filename, char *const argv[], char *const envp[]); 689int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
683 690
diff --git a/kernel/signal.c b/kernel/signal.c
index e2333929611a..e73759783dc8 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2491,11 +2491,10 @@ out:
2491#endif /* __ARCH_WANT_SYS_SIGPROCMASK */ 2491#endif /* __ARCH_WANT_SYS_SIGPROCMASK */
2492 2492
2493#ifdef __ARCH_WANT_SYS_RT_SIGACTION 2493#ifdef __ARCH_WANT_SYS_RT_SIGACTION
2494asmlinkage long 2494SYSCALL_DEFINE4(rt_sigaction, int, sig,
2495sys_rt_sigaction(int sig, 2495 const struct sigaction __user *, act,
2496 const struct sigaction __user *act, 2496 struct sigaction __user *, oact,
2497 struct sigaction __user *oact, 2497 size_t, sigsetsize)
2498 size_t sigsetsize)
2499{ 2498{
2500 struct k_sigaction new_sa, old_sa; 2499 struct k_sigaction new_sa, old_sa;
2501 int ret = -EINVAL; 2500 int ret = -EINVAL;
@@ -2578,7 +2577,7 @@ SYSCALL_DEFINE0(pause)
2578#endif 2577#endif
2579 2578
2580#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND 2579#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
2581asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) 2580SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize)
2582{ 2581{
2583 sigset_t newset; 2582 sigset_t newset;
2584 2583