diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:33 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:31 -0500 |
commit | 836f92adf121f806e9beb5b6b88bd5c9c4ea3f24 (patch) | |
tree | 0deccad6d01b7761a8d96cbc12b8e9541317380e | |
parent | 6559eed8ca7db0531a207cd80be5e28cd6f213c5 (diff) |
[CVE-2009-0029] System call wrappers part 31
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | fs/signalfd.c | 8 | ||||
-rw-r--r-- | fs/splice.c | 12 | ||||
-rw-r--r-- | fs/timerfd.c | 8 | ||||
-rw-r--r-- | kernel/futex.c | 11 | ||||
-rw-r--r-- | kernel/sys.c | 4 |
5 files changed, 21 insertions, 22 deletions
diff --git a/fs/signalfd.c b/fs/signalfd.c index 9c39bc7f8431..b07565c94386 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -205,8 +205,8 @@ static const struct file_operations signalfd_fops = { | |||
205 | .read = signalfd_read, | 205 | .read = signalfd_read, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | 208 | SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask, |
209 | size_t sizemask, int flags) | 209 | size_t, sizemask, int, flags) |
210 | { | 210 | { |
211 | sigset_t sigmask; | 211 | sigset_t sigmask; |
212 | struct signalfd_ctx *ctx; | 212 | struct signalfd_ctx *ctx; |
@@ -259,8 +259,8 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | |||
259 | return ufd; | 259 | return ufd; |
260 | } | 260 | } |
261 | 261 | ||
262 | asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, | 262 | SYSCALL_DEFINE3(signalfd, int, ufd, sigset_t __user *, user_mask, |
263 | size_t sizemask) | 263 | size_t, sizemask) |
264 | { | 264 | { |
265 | return sys_signalfd4(ufd, user_mask, sizemask, 0); | 265 | return sys_signalfd4(ufd, user_mask, sizemask, 0); |
266 | } | 266 | } |
diff --git a/fs/splice.c b/fs/splice.c index a54b3e3f10a7..4ed0ba44a966 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1435,8 +1435,8 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov, | |||
1435 | * Currently we punt and implement it as a normal copy, see pipe_to_user(). | 1435 | * Currently we punt and implement it as a normal copy, see pipe_to_user(). |
1436 | * | 1436 | * |
1437 | */ | 1437 | */ |
1438 | asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | 1438 | SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, iov, |
1439 | unsigned long nr_segs, unsigned int flags) | 1439 | unsigned long, nr_segs, unsigned int, flags) |
1440 | { | 1440 | { |
1441 | struct file *file; | 1441 | struct file *file; |
1442 | long error; | 1442 | long error; |
@@ -1461,9 +1461,9 @@ asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | |||
1461 | return error; | 1461 | return error; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | 1464 | SYSCALL_DEFINE6(splice, int, fd_in, loff_t __user *, off_in, |
1465 | int fd_out, loff_t __user *off_out, | 1465 | int, fd_out, loff_t __user *, off_out, |
1466 | size_t len, unsigned int flags) | 1466 | size_t, len, unsigned int, flags) |
1467 | { | 1467 | { |
1468 | long error; | 1468 | long error; |
1469 | struct file *in, *out; | 1469 | struct file *in, *out; |
@@ -1685,7 +1685,7 @@ static long do_tee(struct file *in, struct file *out, size_t len, | |||
1685 | return ret; | 1685 | return ret; |
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags) | 1688 | SYSCALL_DEFINE4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags) |
1689 | { | 1689 | { |
1690 | struct file *in; | 1690 | struct file *in; |
1691 | int error, fput_in; | 1691 | int error, fput_in; |
diff --git a/fs/timerfd.c b/fs/timerfd.c index 0862f0e49d0c..c8c14f58b96f 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -177,7 +177,7 @@ static struct file *timerfd_fget(int fd) | |||
177 | return file; | 177 | return file; |
178 | } | 178 | } |
179 | 179 | ||
180 | asmlinkage long sys_timerfd_create(int clockid, int flags) | 180 | SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags) |
181 | { | 181 | { |
182 | int ufd; | 182 | int ufd; |
183 | struct timerfd_ctx *ctx; | 183 | struct timerfd_ctx *ctx; |
@@ -208,9 +208,9 @@ asmlinkage long sys_timerfd_create(int clockid, int flags) | |||
208 | return ufd; | 208 | return ufd; |
209 | } | 209 | } |
210 | 210 | ||
211 | asmlinkage long sys_timerfd_settime(int ufd, int flags, | 211 | SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, |
212 | const struct itimerspec __user *utmr, | 212 | const struct itimerspec __user *, utmr, |
213 | struct itimerspec __user *otmr) | 213 | struct itimerspec __user *, otmr) |
214 | { | 214 | { |
215 | struct file *file; | 215 | struct file *file; |
216 | struct timerfd_ctx *ctx; | 216 | struct timerfd_ctx *ctx; |
diff --git a/kernel/futex.c b/kernel/futex.c index e86931d8d4e9..f89d373a9c6d 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -1733,9 +1733,8 @@ pi_faulted: | |||
1733 | * @head: pointer to the list-head | 1733 | * @head: pointer to the list-head |
1734 | * @len: length of the list-head, as userspace expects | 1734 | * @len: length of the list-head, as userspace expects |
1735 | */ | 1735 | */ |
1736 | asmlinkage long | 1736 | SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, |
1737 | sys_set_robust_list(struct robust_list_head __user *head, | 1737 | size_t, len) |
1738 | size_t len) | ||
1739 | { | 1738 | { |
1740 | if (!futex_cmpxchg_enabled) | 1739 | if (!futex_cmpxchg_enabled) |
1741 | return -ENOSYS; | 1740 | return -ENOSYS; |
@@ -1756,9 +1755,9 @@ sys_set_robust_list(struct robust_list_head __user *head, | |||
1756 | * @head_ptr: pointer to a list-head pointer, the kernel fills it in | 1755 | * @head_ptr: pointer to a list-head pointer, the kernel fills it in |
1757 | * @len_ptr: pointer to a length field, the kernel fills in the header size | 1756 | * @len_ptr: pointer to a length field, the kernel fills in the header size |
1758 | */ | 1757 | */ |
1759 | asmlinkage long | 1758 | SYSCALL_DEFINE3(get_robust_list, int, pid, |
1760 | sys_get_robust_list(int pid, struct robust_list_head __user * __user *head_ptr, | 1759 | struct robust_list_head __user * __user *, head_ptr, |
1761 | size_t __user *len_ptr) | 1760 | size_t __user *, len_ptr) |
1762 | { | 1761 | { |
1763 | struct robust_list_head __user *head; | 1762 | struct robust_list_head __user *head; |
1764 | unsigned long ret; | 1763 | unsigned long ret; |
diff --git a/kernel/sys.c b/kernel/sys.c index 59aadcdad6ce..e7dc0e10a485 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1817,8 +1817,8 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
1817 | return error; | 1817 | return error; |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | asmlinkage long sys_getcpu(unsigned __user *cpup, unsigned __user *nodep, | 1820 | SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, |
1821 | struct getcpu_cache __user *unused) | 1821 | struct getcpu_cache __user *, unused) |
1822 | { | 1822 | { |
1823 | int err = 0; | 1823 | int err = 0; |
1824 | int cpu = raw_smp_processor_id(); | 1824 | int cpu = raw_smp_processor_id(); |