Commit 938bb9f5e840eddbf54e4f62f6c5ba9b3ae12c9d

Authored by Heiko Carstens
1 parent 1e7bfb2134

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

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

Showing 5 changed files with 21 additions and 24 deletions Side-by-side Diff

... ... @@ -72,7 +72,7 @@
72 72 }
73 73 EXPORT_SYMBOL_GPL(set_task_ioprio);
74 74  
75   -asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
  75 +SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio)
76 76 {
77 77 int class = IOPRIO_PRIO_CLASS(ioprio);
78 78 int data = IOPRIO_PRIO_DATA(ioprio);
... ... @@ -188,7 +188,7 @@
188 188 return aprio;
189 189 }
190 190  
191   -asmlinkage long sys_ioprio_get(int which, int who)
  191 +SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
192 192 {
193 193 struct task_struct *g, *p;
194 194 struct user_struct *user;
fs/notify/inotify/inotify_user.c
... ... @@ -576,7 +576,7 @@
576 576 .destroy_watch = free_inotify_user_watch,
577 577 };
578 578  
579   -asmlinkage long sys_inotify_init1(int flags)
  579 +SYSCALL_DEFINE1(inotify_init1, int, flags)
580 580 {
581 581 struct inotify_device *dev;
582 582 struct inotify_handle *ih;
... ... @@ -655,7 +655,7 @@
655 655 return ret;
656 656 }
657 657  
658   -asmlinkage long sys_inotify_init(void)
  658 +SYSCALL_DEFINE0(inotify_init)
659 659 {
660 660 return sys_inotify_init1(0);
661 661 }
... ... @@ -1068,10 +1068,9 @@
1068 1068 return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0;
1069 1069 }
1070 1070  
1071   -asmlinkage long sys_mbind(unsigned long start, unsigned long len,
1072   - unsigned long mode,
1073   - unsigned long __user *nmask, unsigned long maxnode,
1074   - unsigned flags)
  1071 +SYSCALL_DEFINE6(mbind, unsigned long, start, unsigned long, len,
  1072 + unsigned long, mode, unsigned long __user *, nmask,
  1073 + unsigned long, maxnode, unsigned, flags)
1075 1074 {
1076 1075 nodemask_t nodes;
1077 1076 int err;
... ... @@ -1091,8 +1090,8 @@
1091 1090 }
1092 1091  
1093 1092 /* Set the process memory policy */
1094   -asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask,
1095   - unsigned long maxnode)
  1093 +SYSCALL_DEFINE3(set_mempolicy, int, mode, unsigned long __user *, nmask,
  1094 + unsigned long, maxnode)
1096 1095 {
1097 1096 int err;
1098 1097 nodemask_t nodes;
... ... @@ -1110,9 +1109,9 @@
1110 1109 return do_set_mempolicy(mode, flags, &nodes);
1111 1110 }
1112 1111  
1113   -asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode,
1114   - const unsigned long __user *old_nodes,
1115   - const unsigned long __user *new_nodes)
  1112 +SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
  1113 + const unsigned long __user *, old_nodes,
  1114 + const unsigned long __user *, new_nodes)
1116 1115 {
1117 1116 const struct cred *cred = current_cred(), *tcred;
1118 1117 struct mm_struct *mm;
... ... @@ -1185,10 +1184,9 @@
1185 1184  
1186 1185  
1187 1186 /* Retrieve NUMA policy */
1188   -asmlinkage long sys_get_mempolicy(int __user *policy,
1189   - unsigned long __user *nmask,
1190   - unsigned long maxnode,
1191   - unsigned long addr, unsigned long flags)
  1187 +SYSCALL_DEFINE5(get_mempolicy, int __user *, policy,
  1188 + unsigned long __user *, nmask, unsigned long, maxnode,
  1189 + unsigned long, addr, unsigned long, flags)
1192 1190 {
1193 1191 int err;
1194 1192 int uninitialized_var(pval);
... ... @@ -1055,10 +1055,10 @@
1055 1055 * Move a list of pages in the address space of the currently executing
1056 1056 * process.
1057 1057 */
1058   -asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
1059   - const void __user * __user *pages,
1060   - const int __user *nodes,
1061   - int __user *status, int flags)
  1058 +SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
  1059 + const void __user * __user *, pages,
  1060 + const int __user *, nodes,
  1061 + int __user *, status, int, flags)
1062 1062 {
1063 1063 const struct cred *cred = current_cred(), *tcred;
1064 1064 struct task_struct *task;
security/keys/keyctl.c
... ... @@ -1216,8 +1216,8 @@
1216 1216 /*
1217 1217 * the key control system call
1218 1218 */
1219   -asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3,
1220   - unsigned long arg4, unsigned long arg5)
  1219 +SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3,
  1220 + unsigned long, arg4, unsigned long, arg5)
1221 1221 {
1222 1222 switch (option) {
1223 1223 case KEYCTL_GET_KEYRING_ID: