* [PATCH] compat: use sys_sendfile64() implementation for sendfile syscall
@ 2012-03-26 20:26 Chris Metcalf
2012-03-26 20:45 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Chris Metcalf @ 2012-03-26 20:26 UTC (permalink / raw)
To: Arnd Bergmann, linux-arch, linux-kernel
<asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit
compat API instead of sys_sendfile64(), but in fact the right thing to
do is to use sys_sendfile64() in all cases. The 32-bit sendfile64() API
in glibc uses the sendfile64 syscall, so it has to be capable of doing
full 64-bit operations. But the sys_sendfile() kernel implementation
has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
So, we need to use the sys_sendfile64() implementation in the kernel
for this case.
Cc: <stable@kernel.org>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
include/asm-generic/unistd.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 2292d1a..991ef01 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -218,7 +218,7 @@ __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
/* fs/sendfile.c */
#define __NR3264_sendfile 71
-__SC_3264(__NR3264_sendfile, sys_sendfile64, sys_sendfile)
+__SYSCALL(__NR3264_sendfile, sys_sendfile64)
/* fs/select.c */
#define __NR_pselect6 72
--
1.6.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] compat: use sys_sendfile64() implementation for sendfile syscall
2012-03-26 20:26 [PATCH] compat: use sys_sendfile64() implementation for sendfile syscall Chris Metcalf
@ 2012-03-26 20:45 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2012-03-26 20:45 UTC (permalink / raw)
To: Chris Metcalf; +Cc: linux-arch, linux-kernel
On Monday 26 March 2012, Chris Metcalf wrote:
> <asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit
> compat API instead of sys_sendfile64(), but in fact the right thing to
> do is to use sys_sendfile64() in all cases. The 32-bit sendfile64() API
> in glibc uses the sendfile64 syscall, so it has to be capable of doing
> full 64-bit operations. But the sys_sendfile() kernel implementation
> has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
> So, we need to use the sys_sendfile64() implementation in the kernel
> for this case.
>
> Cc: <stable@kernel.org>
> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-26 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 20:26 [PATCH] compat: use sys_sendfile64() implementation for sendfile syscall Chris Metcalf
2012-03-26 20:45 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox