Re: sendfile -EOVERFLOW on AMD64

From: Andi Kleen
Date: Wed May 19 2004 - 04:30:16 EST

Jan Kasprzak <kas@xxxxxxxxxxxxxxxxxxx> writes:
> The image (FC2-i386-DVD.iso) has 4370640896 bytes. The FTP server is native
> x86_64 binary, not a 32-bit one.

sys_sendfile limits itself dumbly to 2GB even on 64bit architectures.
This patch should fix it on x86-64, although other 64bit ports may
need a similar patch. Just removing the limit in read_write
is not easy, because it would need fixes in all the 32bit emulation


diff -u linux-2.6.6-amd64/include/asm-x86_64/unistd.h-o linux-2.6.6-amd64/include/asm-x86_64/unistd.h
--- linux-2.6.6-amd64/include/asm-x86_64/unistd.h-o 2004-05-09 14:30:09.000000000 +0200
+++ linux-2.6.6-amd64/include/asm-x86_64/unistd.h 2004-05-19 11:27:00.000000000 +0200
@@ -98,7 +98,7 @@
__SYSCALL(__NR_getpid, sys_getpid)

#define __NR_sendfile 40
-__SYSCALL(__NR_sendfile, sys_sendfile)
+__SYSCALL(__NR_sendfile, sys_sendfile64)
#define __NR_socket 41
__SYSCALL(__NR_socket, sys_socket)
#define __NR_connect 42

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at