sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2018-03-19 23:48:30 -04:00
parent 8ccb004677
commit 8c82ccd631
3 changed files with 13 additions and 19 deletions

View File

@ -194,22 +194,16 @@ COMPAT_SYSCALL_DEFINE5(rt_sigaction, int, sig,
return ret;
}
asmlinkage compat_ssize_t sys32_pread64(unsigned int fd,
char __user *ubuf,
compat_size_t count,
unsigned long poshi,
unsigned long poslo)
COMPAT_SYSCALL_DEFINE5(pread64, unsigned int, fd, char __user *, ubuf,
compat_size_t, count, u32, poshi, u32, poslo)
{
return sys_pread64(fd, ubuf, count, (poshi << 32) | poslo);
return sys_pread64(fd, ubuf, count, ((u64)poshi << 32) | poslo);
}
asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd,
char __user *ubuf,
compat_size_t count,
unsigned long poshi,
unsigned long poslo)
COMPAT_SYSCALL_DEFINE5(pwrite64, unsigned int, fd, char __user *, ubuf,
compat_size_t, count, u32, poshi, u32, poslo)
{
return sys_pwrite64(fd, ubuf, count, (poshi << 32) | poslo);
return sys_pwrite64(fd, ubuf, count, ((u64)poshi << 32) | poslo);
}
COMPAT_SYSCALL_DEFINE4(readahead, int, fd, u32, offhi, u32, offlo,

View File

@ -65,16 +65,16 @@ asmlinkage long compat_sys_fstat64(unsigned int fd,
asmlinkage long compat_sys_fstatat64(unsigned int dfd,
const char __user *filename,
struct compat_stat64 __user * statbuf, int flag);
asmlinkage compat_ssize_t sys32_pread64(unsigned int fd,
asmlinkage long compat_sys_pread64(unsigned int fd,
char __user *ubuf,
compat_size_t count,
unsigned long poshi,
unsigned long poslo);
asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd,
u32 poshi,
u32 poslo);
asmlinkage long compat_sys_pwrite64(unsigned int fd,
char __user *ubuf,
compat_size_t count,
unsigned long poshi,
unsigned long poslo);
u32 poshi,
u32 poslo);
asmlinkage long compat_sys_readahead(int fd,
unsigned offhi,
unsigned offlo,

View File

@ -32,7 +32,7 @@ sys_call_table32:
/*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
.word sys_reboot, sys32_mmap2, sys_symlink, sys_readlink, sys32_execve
/*60*/ .word sys_umask, sys_chroot, compat_sys_newfstat, compat_sys_fstat64, sys_getpagesize
.word sys_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid
.word sys_msync, sys_vfork, compat_sys_pread64, compat_sys_pwrite64, sys_geteuid
/*70*/ .word sys_getegid, sys_mmap, sys_setreuid, sys_munmap, sys_mprotect
.word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys_getgroups16
/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64