[CRIU] [PATCH 04/16] x86: Add 32bit variant of TASK_SIZE

Cyrill Gorcunov gorcunov at openvz.org
Thu Jun 4 14:04:05 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.4.2



More information about the CRIU mailing list