diff mbox

[Trusty,SRU] UBUNTU: SAUCE: (no-up) powerpc: 64bit sendfile is capped at 2GB

Message ID 5396069B.7040108@canonical.com
State New
Headers show

Commit Message

Tim Gardner June 9, 2014, 7:10 p.m. UTC

Comments

Brad Figg June 9, 2014, 8:52 p.m. UTC | #1
On 06/09/2014 12:10 PM, Tim Gardner wrote:
> 
> 
>
Andy Whitcroft June 10, 2014, 9:03 a.m. UTC | #2
On Mon, Jun 09, 2014 at 01:10:19PM -0600, Tim Gardner wrote:
> 
> -- 
> Tim Gardner tim.gardner@canonical.com

> From 8bfe8d32bddc1b1f2c7f9eca4af4e13e72c76bad Mon Sep 17 00:00:00 2001
> From: Anton Blanchard <anton@samba.org>
> Date: Wed, 4 Jun 2014 10:48:48 +1000
> Subject: [PATCH Trusty SRU] UBUNTU: SAUCE: (no-up) powerpc: 64bit sendfile is capped at 2GB
> 
> BugLink: http://bugs.launchpad.net/bugs/1328230
> 
> commit 8f9c0119d7ba (compat: fs: Generic compat_sys_sendfile
> implementation) changed the PowerPC 64bit sendfile call from
> sys_sendile64 to sys_sendfile.
> 
> Unfortunately this broke sendfile of lengths greater than 2G because
> sys_sendfile caps at MAX_NON_LFS. Restore what we had previously which
> fixes the bug.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  arch/powerpc/include/asm/systbl.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
> index 43523fe..05fcdd8 100644
> --- a/arch/powerpc/include/asm/systbl.h
> +++ b/arch/powerpc/include/asm/systbl.h
> @@ -190,7 +190,7 @@ SYSCALL_SPU(getcwd)
>  SYSCALL_SPU(capget)
>  SYSCALL_SPU(capset)
>  COMPAT_SYS(sigaltstack)
> -COMPAT_SYS_SPU(sendfile)
> +SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
>  SYSCALL(ni_syscall)
>  SYSCALL(ni_syscall)
>  PPC_SYS(vfork)

Looks to do something sensible. 

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
diff mbox

Patch

From 8bfe8d32bddc1b1f2c7f9eca4af4e13e72c76bad Mon Sep 17 00:00:00 2001
From: Anton Blanchard <anton@samba.org>
Date: Wed, 4 Jun 2014 10:48:48 +1000
Subject: [PATCH Trusty SRU] UBUNTU: SAUCE: (no-up) powerpc: 64bit sendfile is capped at 2GB

BugLink: http://bugs.launchpad.net/bugs/1328230

commit 8f9c0119d7ba (compat: fs: Generic compat_sys_sendfile
implementation) changed the PowerPC 64bit sendfile call from
sys_sendile64 to sys_sendfile.

Unfortunately this broke sendfile of lengths greater than 2G because
sys_sendfile caps at MAX_NON_LFS. Restore what we had previously which
fixes the bug.

Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/powerpc/include/asm/systbl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 43523fe..05fcdd8 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -190,7 +190,7 @@  SYSCALL_SPU(getcwd)
 SYSCALL_SPU(capget)
 SYSCALL_SPU(capset)
 COMPAT_SYS(sigaltstack)
-COMPAT_SYS_SPU(sendfile)
+SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
 SYSCALL(ni_syscall)
 SYSCALL(ni_syscall)
 PPC_SYS(vfork)
-- 
1.9.1