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

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
Heiko Carstens 2009-01-14 14:14:12 +01:00
parent a5f8fa9e9b
commit bdc480e3be
4 changed files with 11 additions and 14 deletions

View File

@ -3243,7 +3243,7 @@ void block_sync_page(struct page *page)
* Use of bdflush() is deprecated and will be removed in a future kernel.
* The `pdflush' kernel threads fully replace bdflush daemons and this call.
*/
asmlinkage long sys_bdflush(int func, long data)
SYSCALL_DEFINE2(bdflush, int, func, long, data)
{
static int msg_count;

View File

@ -1128,7 +1128,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
*/
asmlinkage long sys_umount(char __user * name, int flags)
SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
{
struct path path;
int retval;
@ -1160,7 +1160,7 @@ asmlinkage long sys_umount(char __user * name, int flags)
/*
* The 2.0 compatible umount. No flags.
*/
asmlinkage long sys_oldumount(char __user * name)
SYSCALL_DEFINE1(oldumount, char __user *, name)
{
return sys_umount(name, 0);
}
@ -2045,9 +2045,8 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
return new_ns;
}
asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name,
char __user * type, unsigned long flags,
void __user * data)
SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name,
char __user *, type, unsigned long, flags, void __user *, data)
{
int retval;
unsigned long data_page;

View File

@ -122,7 +122,7 @@ static int vfs_statfs64(struct dentry *dentry, struct statfs64 *buf)
return 0;
}
asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * buf)
SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct statfs __user *, buf)
{
struct path path;
int error;
@ -138,8 +138,7 @@ asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * b
return error;
}
asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct statfs64 __user *buf)
SYSCALL_DEFINE3(statfs64, const char __user *, pathname, size_t, sz, struct statfs64 __user *, buf)
{
struct path path;
long error;
@ -157,8 +156,7 @@ asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct stat
return error;
}
asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf)
SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct statfs __user *, buf)
{
struct file * file;
struct statfs tmp;
@ -289,7 +287,7 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
return error;
}
asmlinkage long sys_truncate(const char __user * path, unsigned long length)
SYSCALL_DEFINE2(truncate, const char __user *, path, unsigned long, length)
{
/* on 32-bit boxen it will cut the range 2^31--2^32-1 off */
return do_sys_truncate(path, (long)length);
@ -341,7 +339,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
return error;
}
asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length)
SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length)
{
long ret = do_sys_ftruncate(fd, length, 1);
/* avoid REGPARM breakage on x86: */

View File

@ -152,7 +152,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
asmlinkage long sys_stat(char __user * filename, struct __old_kernel_stat __user * statbuf)
SYSCALL_DEFINE2(stat, char __user *, filename, struct __old_kernel_stat __user *, statbuf)
{
struct kstat stat;
int error = vfs_stat_fd(AT_FDCWD, filename, &stat);