[CRIU] [PATCH 4/8] x86: Add 32bit variant of TASK_SIZE

Cyrill Gorcunov gorcunov at openvz.org
Mon May 11 09:06:20 PDT 2015


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 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 3abb419562a9..db41b751b321 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;
-- 
2.1.0



More information about the CRIU mailing list