Commit c4ea37c26a691ad0b7e86aa5884aab27830e95c9

Authored by Heiko Carstens
1 parent d5460c9974

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

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

Showing 4 changed files with 19 additions and 23 deletions Side-by-side Diff

drivers/pci/syscall.c
... ... @@ -14,10 +14,8 @@
14 14 #include <asm/uaccess.h>
15 15 #include "pci.h"
16 16  
17   -asmlinkage long
18   -sys_pciconfig_read(unsigned long bus, unsigned long dfn,
19   - unsigned long off, unsigned long len,
20   - void __user *buf)
  17 +SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn,
  18 + unsigned long, off, unsigned long, len, void __user *, buf)
21 19 {
22 20 struct pci_dev *dev;
23 21 u8 byte;
... ... @@ -86,10 +84,8 @@
86 84 return err;
87 85 }
88 86  
89   -asmlinkage long
90   -sys_pciconfig_write(unsigned long bus, unsigned long dfn,
91   - unsigned long off, unsigned long len,
92   - void __user *buf)
  87 +SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,
  88 + unsigned long, off, unsigned long, len, void __user *, buf)
93 89 {
94 90 struct pci_dev *dev;
95 91 u8 byte;
... ... @@ -814,9 +814,9 @@
814 814 sender->state = STATE_READY;
815 815 }
816 816  
817   -asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr,
818   - size_t msg_len, unsigned int msg_prio,
819   - const struct timespec __user *u_abs_timeout)
  817 +SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
  818 + size_t, msg_len, unsigned int, msg_prio,
  819 + const struct timespec __user *, u_abs_timeout)
820 820 {
821 821 struct file *filp;
822 822 struct inode *inode;
... ... @@ -907,9 +907,9 @@
907 907 return ret;
908 908 }
909 909  
910   -asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr,
911   - size_t msg_len, unsigned int __user *u_msg_prio,
912   - const struct timespec __user *u_abs_timeout)
  910 +SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
  911 + size_t, msg_len, unsigned int __user *, u_msg_prio,
  912 + const struct timespec __user *, u_abs_timeout)
913 913 {
914 914 long timeout;
915 915 ssize_t ret;
... ... @@ -997,8 +997,8 @@
997 997 * and he isn't currently owner of notification, will be silently discarded.
998 998 * It isn't explicitly defined in the POSIX.
999 999 */
1000   -asmlinkage long sys_mq_notify(mqd_t mqdes,
1001   - const struct sigevent __user *u_notification)
  1000 +SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
  1001 + const struct sigevent __user *, u_notification)
1002 1002 {
1003 1003 int ret;
1004 1004 struct file *filp;
... ... @@ -1123,9 +1123,9 @@
1123 1123 return ret;
1124 1124 }
1125 1125  
1126   -asmlinkage long sys_mq_getsetattr(mqd_t mqdes,
1127   - const struct mq_attr __user *u_mqstat,
1128   - struct mq_attr __user *u_omqstat)
  1126 +SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
  1127 + const struct mq_attr __user *, u_mqstat,
  1128 + struct mq_attr __user *, u_omqstat)
1129 1129 {
1130 1130 int ret;
1131 1131 struct mq_attr mqstat, omqstat;
... ... @@ -1703,8 +1703,8 @@
1703 1703 return mask;
1704 1704 }
1705 1705  
1706   -asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
1707   - unsigned long arg4, unsigned long arg5)
  1706 +SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
  1707 + unsigned long, arg4, unsigned long, arg5)
1708 1708 {
1709 1709 struct task_struct *me = current;
1710 1710 unsigned char comm[sizeof(me->comm)];
... ... @@ -1377,7 +1377,7 @@
1377 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 1382 struct swap_info_struct * p = NULL;
1383 1383 unsigned short *swap_map;
... ... @@ -1633,7 +1633,7 @@
1633 1633 *
1634 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 1638 struct swap_info_struct * p;
1639 1639 char *name = NULL;