[CVE-2009-0029] System call wrapper special cases
System calls with an unsigned long long argument can't be converted with the standard wrappers since that would include a cast to long, which in turn means that we would lose the upper 32 bit on 32 bit architectures. Also semctl can't use the standard wrapper since it has a 'union' parameter. So we handle them as special case and add some extra wrappers instead. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
@@ -1374,7 +1374,7 @@ do_readahead(struct address_space *mapping, struct file *filp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
asmlinkage long sys_readahead(int fd, loff_t offset, size_t count)
|
||||
SYSCALL_DEFINE(readahead)(int fd, loff_t offset, size_t count)
|
||||
{
|
||||
ssize_t ret;
|
||||
struct file *file;
|
||||
@@ -1393,6 +1393,13 @@ asmlinkage long sys_readahead(int fd, loff_t offset, size_t count)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
|
||||
asmlinkage long SyS_readahead(long fd, loff_t offset, long count)
|
||||
{
|
||||
return SYSC_readahead((int) fd, offset, (size_t) count);
|
||||
}
|
||||
SYSCALL_ALIAS(sys_readahead, SyS_readahead);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/**
|
||||
|
Reference in New Issue
Block a user