]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix sendfile on 64bit architectures
authorAndrew Morton <akpm@osdl.org>
Sat, 22 May 2004 03:37:41 +0000 (20:37 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 22 May 2004 03:37:41 +0000 (20:37 -0700)
From: Andi Kleen <ak@suse.de>

sys_sendfile has a hardcoded 2GB limit.  64bit architectures should
probably always use sys_sendfile64() in their native system tables, because
for them sizeof(off_t) == sizeof(loff_t).  This patch does this.  It seemed
easier to just change the 64bit entry tables instead of fixing up all the
emulation layers to do 2GB checks on their own.

I changed all 64bit architectures except for parisc64, which seemed to
already have a sendfile64.

arch/alpha/kernel/systbls.S
arch/ia64/kernel/entry.S
arch/mips/kernel/scall64-64.S
arch/ppc64/kernel/misc.S
arch/s390/kernel/syscalls.S
arch/sparc64/kernel/systbls.S
include/asm-x86_64/unistd.h

index 8e28e03824cf7800e3ce7c87fe7303f94efad8d6..7caf209d6de2a50528b40013bdace012b71d78b8 100644 (file)
@@ -389,7 +389,7 @@ sys_call_table:
        .quad sys_getcwd
        .quad sys_capget
        .quad sys_capset
-       .quad sys_sendfile                      /* 370 */
+       .quad sys_sendfile64                    /* 370 */
        .quad sys_setresgid
        .quad sys_getresgid
        .quad sys_ni_syscall                    /* sys_dipc */
index da87bce8202ecedaf48f7ddb23f4b76f9efdf002..1d8a3546e074b49e8039836e0713313b7e639160 100644 (file)
@@ -1429,7 +1429,7 @@ sys_call_table:
        data8 sys_getcwd
        data8 sys_capget                        // 1185
        data8 sys_capset
-       data8 sys_sendfile
+       data8 sys_sendfile64
        data8 sys_ni_syscall            // sys_getpmsg (STREAMS)
        data8 sys_ni_syscall            // sys_putpmsg (STREAMS)
        data8 sys_socket                        // 1190
index f8b8d4e4a4b86ecfe0ce5aa8f3e0256ac5d6fb27..19e430d62c47f5113c9a44496416fdde52267628 100644 (file)
@@ -250,7 +250,7 @@ sys_call_table:
        PTR     sys_setitimer
        PTR     sys_alarm
        PTR     sys_getpid
-       PTR     sys_sendfile
+       PTR     sys_sendfile64
        PTR     sys_socket                      /* 5040 */
        PTR     sys_connect
        PTR     sys_accept
index 55ac8b7cb87fa3c8817db26f24cf69ca75642fe5..21137a417f57f9878647d4dd845cb5c002abdf31 100644 (file)
@@ -1040,7 +1040,7 @@ _GLOBAL(sys_call_table)
        .llong .sys_capget
        .llong .sys_capset
        .llong .sys_sigaltstack         /* 185 */
-       .llong .sys_sendfile
+       .llong .sys_sendfile64
        .llong .sys_ni_syscall          /* reserved for streams1 */
        .llong .sys_ni_syscall          /* reserved for streams2 */
        .llong .sys_vfork
index c5955e311cc3f95c666bfc44f19219661923cd6d..9186fe765ab5cb6d52abd3b723e52f42a98bcf24 100644 (file)
@@ -195,7 +195,7 @@ SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper)
 SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper)
 SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper)            /* 185 */
 SYSCALL(sys_sigaltstack_glue,sys_sigaltstack_glue,sys32_sigaltstack_glue)
-SYSCALL(sys_sendfile,sys_sendfile,sys32_sendfile_wrapper)
+SYSCALL(sys_sendfile,sys_sendfile64,sys32_sendfile_wrapper)
 NI_SYSCALL                                                     /* streams1 */
 NI_SYSCALL                                                     /* streams2 */
 SYSCALL(sys_vfork_glue,sys_vfork_glue,sys_vfork_glue)          /* 190 */
index 4a7ca52d01fca61f73d256afeb20787581ec6b5d..4ad0573f1ec65663394e60bc08d3fd8f0e4fe8e5 100644 (file)
@@ -90,7 +90,7 @@ sys_call_table:
 /*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
 /*25*/ .word sys_nis_syscall, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall
 /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice
-       .word sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile
+       .word sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile64
 /*40*/ .word sys_newlstat, sys_dup, sys_pipe, sys_times, sys_nis_syscall
        .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid
 /*50*/ .word sys_getegid, sys_acct, sys_memory_ordering, sys_nis_syscall, sys_ioctl
index 800cf66790c136bfd5fa1d6636df4aa1715609ca..d6de6a5be77a263515e6a530ce6c73a92b07272a 100644 (file)
@@ -98,7 +98,7 @@ __SYSCALL(__NR_setitimer, sys_setitimer)
 __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