diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:28 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:29 -0500 |
commit | c4ea37c26a691ad0b7e86aa5884aab27830e95c9 (patch) | |
tree | 4a3bd25e61cd3782f535ad2140a01bf3835dca4f | |
parent | d5460c9974a321a194aded4a8c4daaac68ea8171 (diff) |
[CVE-2009-0029] System call wrappers part 26
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | drivers/pci/syscall.c | 12 | ||||
-rw-r--r-- | ipc/mqueue.c | 22 | ||||
-rw-r--r-- | kernel/sys.c | 4 | ||||
-rw-r--r-- | mm/swapfile.c | 4 |
4 files changed, 19 insertions, 23 deletions
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index 645d7a60e412..ec22284eed30 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c | |||
@@ -14,10 +14,8 @@ | |||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include "pci.h" | 15 | #include "pci.h" |
16 | 16 | ||
17 | asmlinkage long | 17 | SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, |
18 | sys_pciconfig_read(unsigned long bus, unsigned long dfn, | 18 | unsigned long, off, unsigned long, len, void __user *, buf) |
19 | unsigned long off, unsigned long len, | ||
20 | void __user *buf) | ||
21 | { | 19 | { |
22 | struct pci_dev *dev; | 20 | struct pci_dev *dev; |
23 | u8 byte; | 21 | u8 byte; |
@@ -86,10 +84,8 @@ error: | |||
86 | return err; | 84 | return err; |
87 | } | 85 | } |
88 | 86 | ||
89 | asmlinkage long | 87 | SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn, |
90 | sys_pciconfig_write(unsigned long bus, unsigned long dfn, | 88 | unsigned long, off, unsigned long, len, void __user *, buf) |
91 | unsigned long off, unsigned long len, | ||
92 | void __user *buf) | ||
93 | { | 89 | { |
94 | struct pci_dev *dev; | 90 | struct pci_dev *dev; |
95 | u8 byte; | 91 | u8 byte; |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index faac04c85e74..54b4077fed79 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -814,9 +814,9 @@ static inline void pipelined_receive(struct mqueue_inode_info *info) | |||
814 | sender->state = STATE_READY; | 814 | sender->state = STATE_READY; |
815 | } | 815 | } |
816 | 816 | ||
817 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr, | 817 | SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr, |
818 | size_t msg_len, unsigned int msg_prio, | 818 | size_t, msg_len, unsigned int, msg_prio, |
819 | const struct timespec __user *u_abs_timeout) | 819 | const struct timespec __user *, u_abs_timeout) |
820 | { | 820 | { |
821 | struct file *filp; | 821 | struct file *filp; |
822 | struct inode *inode; | 822 | struct inode *inode; |
@@ -907,9 +907,9 @@ out: | |||
907 | return ret; | 907 | return ret; |
908 | } | 908 | } |
909 | 909 | ||
910 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, | 910 | SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr, |
911 | size_t msg_len, unsigned int __user *u_msg_prio, | 911 | size_t, msg_len, unsigned int __user *, u_msg_prio, |
912 | const struct timespec __user *u_abs_timeout) | 912 | const struct timespec __user *, u_abs_timeout) |
913 | { | 913 | { |
914 | long timeout; | 914 | long timeout; |
915 | ssize_t ret; | 915 | ssize_t ret; |
@@ -997,8 +997,8 @@ out: | |||
997 | * and he isn't currently owner of notification, will be silently discarded. | 997 | * and he isn't currently owner of notification, will be silently discarded. |
998 | * It isn't explicitly defined in the POSIX. | 998 | * It isn't explicitly defined in the POSIX. |
999 | */ | 999 | */ |
1000 | asmlinkage long sys_mq_notify(mqd_t mqdes, | 1000 | SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, |
1001 | const struct sigevent __user *u_notification) | 1001 | const struct sigevent __user *, u_notification) |
1002 | { | 1002 | { |
1003 | int ret; | 1003 | int ret; |
1004 | struct file *filp; | 1004 | struct file *filp; |
@@ -1123,9 +1123,9 @@ out: | |||
1123 | return ret; | 1123 | return ret; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, | 1126 | SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes, |
1127 | const struct mq_attr __user *u_mqstat, | 1127 | const struct mq_attr __user *, u_mqstat, |
1128 | struct mq_attr __user *u_omqstat) | 1128 | struct mq_attr __user *, u_omqstat) |
1129 | { | 1129 | { |
1130 | int ret; | 1130 | int ret; |
1131 | struct mq_attr mqstat, omqstat; | 1131 | struct mq_attr mqstat, omqstat; |
diff --git a/kernel/sys.c b/kernel/sys.c index 70ffa8408cd4..59aadcdad6ce 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1703,8 +1703,8 @@ SYSCALL_DEFINE1(umask, int, mask) | |||
1703 | return mask; | 1703 | return mask; |
1704 | } | 1704 | } |
1705 | 1705 | ||
1706 | asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | 1706 | SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, |
1707 | unsigned long arg4, unsigned long arg5) | 1707 | unsigned long, arg4, unsigned long, arg5) |
1708 | { | 1708 | { |
1709 | struct task_struct *me = current; | 1709 | struct task_struct *me = current; |
1710 | unsigned char comm[sizeof(me->comm)]; | 1710 | unsigned char comm[sizeof(me->comm)]; |
diff --git a/mm/swapfile.c b/mm/swapfile.c index da422c47e2ee..f48b831e5e5c 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1377,7 +1377,7 @@ out: | |||
1377 | return ret; | 1377 | return ret; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | asmlinkage long sys_swapoff(const char __user * specialfile) | 1380 | SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) |
1381 | { | 1381 | { |
1382 | struct swap_info_struct * p = NULL; | 1382 | struct swap_info_struct * p = NULL; |
1383 | unsigned short *swap_map; | 1383 | unsigned short *swap_map; |
@@ -1633,7 +1633,7 @@ late_initcall(max_swapfiles_check); | |||
1633 | * | 1633 | * |
1634 | * The swapon system call | 1634 | * The swapon system call |
1635 | */ | 1635 | */ |
1636 | asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | 1636 | SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) |
1637 | { | 1637 | { |
1638 | struct swap_info_struct * p; | 1638 | struct swap_info_struct * p; |
1639 | char *name = NULL; | 1639 | char *name = NULL; |