aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-01-29 17:05:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-29 19:22:40 -0500
commitd8d14bd09cddbaf0168d61af638455a26bd027ff (patch)
tree7f52af4737d5435e87a25e767d04de33223fccc5
parentdfd948e32af2e7b28bcd7a490c0a30d4b8df2a36 (diff)
fs/compat: fix lookup_dcookie() parameter handling
Commit d5dc77bfeeab ("consolidate compat lookup_dcookie()") coverted all architectures to the new compat_sys_lookup_dcookie() syscall. The "len" paramater of the new compat syscall must have the type compat_size_t in order to enforce zero extension 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>
-rw-r--r--fs/dcookies.c2
-rw-r--r--include/linux/compat.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/dcookies.c b/fs/dcookies.c
index ab5954b50267..ac44a69fbea9 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -204,7 +204,7 @@ out:
204} 204}
205 205
206#ifdef CONFIG_COMPAT 206#ifdef CONFIG_COMPAT
207COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, size_t, len) 207COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, compat_size_t, len)
208{ 208{
209#ifdef __BIG_ENDIAN 209#ifdef __BIG_ENDIAN
210 return sys_lookup_dcookie(((u64)w0 << 32) | w1, buf, len); 210 return sys_lookup_dcookie(((u64)w0 << 32) | w1, buf, len);
diff --git a/include/linux/compat.h b/include/linux/compat.h
index c5642b83e02b..19f6003291de 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -422,7 +422,7 @@ extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
422asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, 422asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
423 compat_long_t addr, compat_long_t data); 423 compat_long_t addr, compat_long_t data);
424 424
425asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, size_t); 425asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
426/* 426/*
427 * epoll (fs/eventpoll.c) compat bits follow ... 427 * epoll (fs/eventpoll.c) compat bits follow ...
428 */ 428 */