aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:14:12 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:22 -0500
commitbdc480e3bef6eb0e7071770834cbdda7e30a5436 (patch)
tree2bfea8d2b61ccedc3edea4f78e3250eea7f770cc
parenta5f8fa9e9ba5ef3305e147f41ad6e1e84ac1f0bd (diff)
[CVE-2009-0029] System call wrappers part 10
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/namespace.c9
-rw-r--r--fs/open.c12
-rw-r--r--fs/stat.c2
4 files changed, 11 insertions, 14 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index b6e8b8632e2f..b58208f1640a 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3243,7 +3243,7 @@ void block_sync_page(struct page *page)
3243 * Use of bdflush() is deprecated and will be removed in a future kernel. 3243 * Use of bdflush() is deprecated and will be removed in a future kernel.
3244 * The `pdflush' kernel threads fully replace bdflush daemons and this call. 3244 * The `pdflush' kernel threads fully replace bdflush daemons and this call.
3245 */ 3245 */
3246asmlinkage long sys_bdflush(int func, long data) 3246SYSCALL_DEFINE2(bdflush, int, func, long, data)
3247{ 3247{
3248 static int msg_count; 3248 static int msg_count;
3249 3249
diff --git a/fs/namespace.c b/fs/namespace.c
index a40685d800a8..3876a0fbaa60 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1128,7 +1128,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
1128 * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD 1128 * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
1129 */ 1129 */
1130 1130
1131asmlinkage long sys_umount(char __user * name, int flags) 1131SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
1132{ 1132{
1133 struct path path; 1133 struct path path;
1134 int retval; 1134 int retval;
@@ -1160,7 +1160,7 @@ out:
1160/* 1160/*
1161 * The 2.0 compatible umount. No flags. 1161 * The 2.0 compatible umount. No flags.
1162 */ 1162 */
1163asmlinkage long sys_oldumount(char __user * name) 1163SYSCALL_DEFINE1(oldumount, char __user *, name)
1164{ 1164{
1165 return sys_umount(name, 0); 1165 return sys_umount(name, 0);
1166} 1166}
@@ -2045,9 +2045,8 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
2045 return new_ns; 2045 return new_ns;
2046} 2046}
2047 2047
2048asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name, 2048SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name,
2049 char __user * type, unsigned long flags, 2049 char __user *, type, unsigned long, flags, void __user *, data)
2050 void __user * data)
2051{ 2050{
2052 int retval; 2051 int retval;
2053 unsigned long data_page; 2052 unsigned long data_page;
diff --git a/fs/open.c b/fs/open.c
index e349013fc790..f6c2f5673ed5 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -122,7 +122,7 @@ static int vfs_statfs64(struct dentry *dentry, struct statfs64 *buf)
122 return 0; 122 return 0;
123} 123}
124 124
125asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * buf) 125SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct statfs __user *, buf)
126{ 126{
127 struct path path; 127 struct path path;
128 int error; 128 int error;
@@ -138,8 +138,7 @@ asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * b
138 return error; 138 return error;
139} 139}
140 140
141 141SYSCALL_DEFINE3(statfs64, const char __user *, pathname, size_t, sz, struct statfs64 __user *, buf)
142asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct statfs64 __user *buf)
143{ 142{
144 struct path path; 143 struct path path;
145 long error; 144 long error;
@@ -157,8 +156,7 @@ asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct stat
157 return error; 156 return error;
158} 157}
159 158
160 159SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct statfs __user *, buf)
161asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf)
162{ 160{
163 struct file * file; 161 struct file * file;
164 struct statfs tmp; 162 struct statfs tmp;
@@ -289,7 +287,7 @@ out:
289 return error; 287 return error;
290} 288}
291 289
292asmlinkage long sys_truncate(const char __user * path, unsigned long length) 290SYSCALL_DEFINE2(truncate, const char __user *, path, unsigned long, length)
293{ 291{
294 /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */ 292 /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */
295 return do_sys_truncate(path, (long)length); 293 return do_sys_truncate(path, (long)length);
@@ -341,7 +339,7 @@ out:
341 return error; 339 return error;
342} 340}
343 341
344asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length) 342SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length)
345{ 343{
346 long ret = do_sys_ftruncate(fd, length, 1); 344 long ret = do_sys_ftruncate(fd, length, 1);
347 /* avoid REGPARM breakage on x86: */ 345 /* avoid REGPARM breakage on x86: */
diff --git a/fs/stat.c b/fs/stat.c
index 7e12a6f82795..a1411648048a 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -152,7 +152,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta
152 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; 152 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
153} 153}
154 154
155asmlinkage long sys_stat(char __user * filename, struct __old_kernel_stat __user * statbuf) 155SYSCALL_DEFINE2(stat, char __user *, filename, struct __old_kernel_stat __user *, statbuf)
156{ 156{
157 struct kstat stat; 157 struct kstat stat;
158 int error = vfs_stat_fd(AT_FDCWD, filename, &stat); 158 int error = vfs_stat_fd(AT_FDCWD, filename, &stat);