aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32/sys_ia32.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-06-20 12:23:30 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-20 14:27:25 -0700
commite412ac4971d27ea84f3d63ce425c6ab2d6a67f23 (patch)
treee73b08d0114f5cc63ad8f44f4e11434abc8f642f /arch/x86_64/ia32/sys_ia32.c
parent[POWERPC] rheap - eliminates internal fragments caused by alignment (diff)
downloadlinux-dev-e412ac4971d27ea84f3d63ce425c6ab2d6a67f23.tar.xz
linux-dev-e412ac4971d27ea84f3d63ce425c6ab2d6a67f23.zip
x86_64: Fix readahead/sync_file_range/fadvise64 compat calls
Correctly convert the u64 arguments from 32bit to 64bit. Pointed out by Heiko Carstens. I guess this proves Linus' theory that nobody uses the more exotic Linux specific syscalls. It wasn't discovered by a user. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/x86_64/ia32/sys_ia32.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index 200fdde18d96..99a78a3cce7c 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -860,3 +860,22 @@ long sys32_lookup_dcookie(u32 addr_low, u32 addr_high,
return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len);
}
+asmlinkage ssize_t sys32_readahead(int fd, unsigned off_lo, unsigned off_hi, size_t count)
+{
+ return sys_readahead(fd, ((u64)off_hi << 32) | off_lo, count);
+}
+
+asmlinkage long sys32_sync_file_range(int fd, unsigned off_low, unsigned off_hi,
+ unsigned n_low, unsigned n_hi, int flags)
+{
+ return sys_sync_file_range(fd,
+ ((u64)off_hi << 32) | off_low,
+ ((u64)n_hi << 32) | n_low, flags);
+}
+
+asmlinkage long sys32_fadvise64(int fd, unsigned offset_lo, unsigned offset_hi, size_t len,
+ int advice)
+{
+ return sys_fadvise64_64(fd, ((u64)offset_hi << 32) | offset_lo,
+ len, advice);
+}