2019-07-30 11:14:25

by Will Deacon

[permalink] [raw]
Subject: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

From: Will Deacon <[email protected]>

[ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]

arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
for compat tasks.

Cc: <[email protected]> # 4.9+
Cc: Aurelien Jarno <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Reviewed-by: Dave Martin <[email protected]>
Reported-by: Steve McIntyre <[email protected]>
Tested-by: Steve McIntyre <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
---

Aurelien points out that this didn't get selected for -stable despite its
counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
in compat_sys_sigaltstack")) being backported to 4.9. Oops.

arch/arm64/include/asm/compat.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index 1a037b94eba1..cee28a05ee98 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -159,6 +159,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
}

#define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
+#define COMPAT_MINSIGSTKSZ 2048

static inline void __user *arch_compat_alloc_user_space(long len)
{
--
2.11.0


2019-07-30 11:19:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

On Tue, Jul 30, 2019 at 10:25:47AM +0100, Will Deacon wrote:
> From: Will Deacon <[email protected]>
>
> [ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]
>
> arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
> for compat tasks.
>
> Cc: <[email protected]> # 4.9+
> Cc: Aurelien Jarno <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Cc: Dominik Brodowski <[email protected]>
> Cc: "Eric W. Biederman" <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Al Viro <[email protected]>
> Cc: Oleg Nesterov <[email protected]>
> Reviewed-by: Dave Martin <[email protected]>
> Reported-by: Steve McIntyre <[email protected]>
> Tested-by: Steve McIntyre <[email protected]>
> Signed-off-by: Will Deacon <[email protected]>
> Signed-off-by: Catalin Marinas <[email protected]>
> ---
>
> Aurelien points out that this didn't get selected for -stable despite its
> counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
> in compat_sys_sigaltstack")) being backported to 4.9. Oops.

So this needs to go into 4.9.y, 4.14.y, and 4.19.y?

thanks,

greg k-h

2019-07-30 11:24:07

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

On Tue, Jul 30, 2019 at 11:37:13AM +0200, Greg KH wrote:
> On Tue, Jul 30, 2019 at 10:25:47AM +0100, Will Deacon wrote:
> > From: Will Deacon <[email protected]>
> >
> > [ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]
> >
> > arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
> > for compat tasks.
> >
> > Cc: <[email protected]> # 4.9+
> > Cc: Aurelien Jarno <[email protected]>
> > Cc: Arnd Bergmann <[email protected]>
> > Cc: Dominik Brodowski <[email protected]>
> > Cc: "Eric W. Biederman" <[email protected]>
> > Cc: Andrew Morton <[email protected]>
> > Cc: Al Viro <[email protected]>
> > Cc: Oleg Nesterov <[email protected]>
> > Reviewed-by: Dave Martin <[email protected]>
> > Reported-by: Steve McIntyre <[email protected]>
> > Tested-by: Steve McIntyre <[email protected]>
> > Signed-off-by: Will Deacon <[email protected]>
> > Signed-off-by: Catalin Marinas <[email protected]>
> > ---
> >
> > Aurelien points out that this didn't get selected for -stable despite its
> > counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
> > in compat_sys_sigaltstack")) being backported to 4.9. Oops.
>
> So this needs to go into 4.9.y, 4.14.y, and 4.19.y?

Yes, please.

Will

2019-07-30 11:25:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

On Tue, Jul 30, 2019 at 10:39:38AM +0100, Will Deacon wrote:
> On Tue, Jul 30, 2019 at 11:37:13AM +0200, Greg KH wrote:
> > On Tue, Jul 30, 2019 at 10:25:47AM +0100, Will Deacon wrote:
> > > From: Will Deacon <[email protected]>
> > >
> > > [ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]
> > >
> > > arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
> > > for compat tasks.
> > >
> > > Cc: <[email protected]> # 4.9+
> > > Cc: Aurelien Jarno <[email protected]>
> > > Cc: Arnd Bergmann <[email protected]>
> > > Cc: Dominik Brodowski <[email protected]>
> > > Cc: "Eric W. Biederman" <[email protected]>
> > > Cc: Andrew Morton <[email protected]>
> > > Cc: Al Viro <[email protected]>
> > > Cc: Oleg Nesterov <[email protected]>
> > > Reviewed-by: Dave Martin <[email protected]>
> > > Reported-by: Steve McIntyre <[email protected]>
> > > Tested-by: Steve McIntyre <[email protected]>
> > > Signed-off-by: Will Deacon <[email protected]>
> > > Signed-off-by: Catalin Marinas <[email protected]>
> > > ---
> > >
> > > Aurelien points out that this didn't get selected for -stable despite its
> > > counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
> > > in compat_sys_sigaltstack")) being backported to 4.9. Oops.
> >
> > So this needs to go into 4.9.y, 4.14.y, and 4.19.y?
>
> Yes, please.

Thanks, will do after this next round of kernels goes out.

greg k-h

2019-07-31 11:04:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

On Tue, Jul 30, 2019 at 11:42:26AM +0200, Greg KH wrote:
> On Tue, Jul 30, 2019 at 10:39:38AM +0100, Will Deacon wrote:
> > On Tue, Jul 30, 2019 at 11:37:13AM +0200, Greg KH wrote:
> > > On Tue, Jul 30, 2019 at 10:25:47AM +0100, Will Deacon wrote:
> > > > From: Will Deacon <[email protected]>
> > > >
> > > > [ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]
> > > >
> > > > arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
> > > > for compat tasks.
> > > >
> > > > Cc: <[email protected]> # 4.9+
> > > > Cc: Aurelien Jarno <[email protected]>
> > > > Cc: Arnd Bergmann <[email protected]>
> > > > Cc: Dominik Brodowski <[email protected]>
> > > > Cc: "Eric W. Biederman" <[email protected]>
> > > > Cc: Andrew Morton <[email protected]>
> > > > Cc: Al Viro <[email protected]>
> > > > Cc: Oleg Nesterov <[email protected]>
> > > > Reviewed-by: Dave Martin <[email protected]>
> > > > Reported-by: Steve McIntyre <[email protected]>
> > > > Tested-by: Steve McIntyre <[email protected]>
> > > > Signed-off-by: Will Deacon <[email protected]>
> > > > Signed-off-by: Catalin Marinas <[email protected]>
> > > > ---
> > > >
> > > > Aurelien points out that this didn't get selected for -stable despite its
> > > > counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
> > > > in compat_sys_sigaltstack")) being backported to 4.9. Oops.
> > >
> > > So this needs to go into 4.9.y, 4.14.y, and 4.19.y?
> >
> > Yes, please.
>
> Thanks, will do after this next round of kernels goes out.

Now queued up, thanks.

greg k-h

2019-07-31 12:28:44

by Aurelien Jarno

[permalink] [raw]
Subject: Re: [PATCH] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ

On 2019-07-31 11:47, Greg KH wrote:
> On Tue, Jul 30, 2019 at 11:42:26AM +0200, Greg KH wrote:
> > On Tue, Jul 30, 2019 at 10:39:38AM +0100, Will Deacon wrote:
> > > On Tue, Jul 30, 2019 at 11:37:13AM +0200, Greg KH wrote:
> > > > On Tue, Jul 30, 2019 at 10:25:47AM +0100, Will Deacon wrote:
> > > > > From: Will Deacon <[email protected]>
> > > > >
> > > > > [ Upstream commit 24951465cbd279f60b1fdc2421b3694405bcff42 ]
> > > > >
> > > > > arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
> > > > > for compat tasks.
> > > > >
> > > > > Cc: <[email protected]> # 4.9+
> > > > > Cc: Aurelien Jarno <[email protected]>
> > > > > Cc: Arnd Bergmann <[email protected]>
> > > > > Cc: Dominik Brodowski <[email protected]>
> > > > > Cc: "Eric W. Biederman" <[email protected]>
> > > > > Cc: Andrew Morton <[email protected]>
> > > > > Cc: Al Viro <[email protected]>
> > > > > Cc: Oleg Nesterov <[email protected]>
> > > > > Reviewed-by: Dave Martin <[email protected]>
> > > > > Reported-by: Steve McIntyre <[email protected]>
> > > > > Tested-by: Steve McIntyre <[email protected]>
> > > > > Signed-off-by: Will Deacon <[email protected]>
> > > > > Signed-off-by: Catalin Marinas <[email protected]>
> > > > > ---
> > > > >
> > > > > Aurelien points out that this didn't get selected for -stable despite its
> > > > > counterpart (22839869f21a ("signal: Introduce COMPAT_SIGMINSTKSZ for use
> > > > > in compat_sys_sigaltstack")) being backported to 4.9. Oops.
> > > >
> > > > So this needs to go into 4.9.y, 4.14.y, and 4.19.y?
> > >
> > > Yes, please.
> >
> > Thanks, will do after this next round of kernels goes out.
>
> Now queued up, thanks.
>

Thanks!

--
Aurelien Jarno GPG: 4096R/1DDD8C9B
[email protected] http://www.aurel32.net