From 816c802176d2b84df60287c6425ac7fd0d575d24 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Fri, 5 Jun 2015 00:04:05 +0300 Subject: [PATCH] x86: Add 32bit variant of TASK_SIZE Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- arch/x86/include/asm/types.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index 3abb41956..db41b751b 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h @@ -109,7 +109,15 @@ typedef struct { #define ASSIGN_TYPED(a, b) do { a = (typeof(a))b; } while (0) #define ASSIGN_MEMBER(a,b,m) do { ASSIGN_TYPED((a)->m, (b)->m); } while (0) -#define TASK_SIZE ((1UL << 47) - PAGE_SIZE) +#ifdef CONFIG_X86_64 +# define TASK_SIZE ((1UL << 47) - PAGE_SIZE) +#else +/* + * Task size may be limited to 3G but we need a + * higher limit, because it's backward compatible. + */ +# define TASK_SIZE (0xffffe000) +#endif typedef u64 auxv_t; typedef u32 tls_t;