aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-01-29 17:05:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-29 19:22:39 -0500
commitdfd948e32af2e7b28bcd7a490c0a30d4b8df2a36 (patch)
tree41f14ee51b5d57387a425b241c67f7d33446076b /include/linux/compat.h
parent4a404bea941ac3c62e11b88c9d16197334eee2f1 (diff)
fs/compat: fix parameter handling for compat readv/writev syscalls
We got a report that the pwritev syscall does not work correctly in compat mode on s390. It turned out that with commit 72ec35163f9f ("switch compat readv/writev variants to COMPAT_SYSCALL_DEFINE") we lost the zero extension of a couple of syscall parameters because the some parameter types haven't been converted from unsigned long to compat_ulong_t. This is needed for architectures where the ABI requires that the caller of a function performed zero and/or sign extension to 64 bit of all parameters. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Ingo Molnar <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: <stable@vger.kernel.org> [v3.10+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index eb8a49d75ab3..c5642b83e02b 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -327,16 +327,16 @@ asmlinkage long compat_sys_keyctl(u32 option,
327 u32 arg2, u32 arg3, u32 arg4, u32 arg5); 327 u32 arg2, u32 arg3, u32 arg4, u32 arg5);
328asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32); 328asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
329 329
330asmlinkage ssize_t compat_sys_readv(unsigned long fd, 330asmlinkage ssize_t compat_sys_readv(compat_ulong_t fd,
331 const struct compat_iovec __user *vec, unsigned long vlen); 331 const struct compat_iovec __user *vec, compat_ulong_t vlen);
332asmlinkage ssize_t compat_sys_writev(unsigned long fd, 332asmlinkage ssize_t compat_sys_writev(compat_ulong_t fd,
333 const struct compat_iovec __user *vec, unsigned long vlen); 333 const struct compat_iovec __user *vec, compat_ulong_t vlen);
334asmlinkage ssize_t compat_sys_preadv(unsigned long fd, 334asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd,
335 const struct compat_iovec __user *vec, 335 const struct compat_iovec __user *vec,
336 unsigned long vlen, u32 pos_low, u32 pos_high); 336 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
337asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, 337asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd,
338 const struct compat_iovec __user *vec, 338 const struct compat_iovec __user *vec,
339 unsigned long vlen, u32 pos_low, u32 pos_high); 339 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
340asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int); 340asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int);
341 341
342asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, 342asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv,