[CRIU] [PATCH] criu: mem -- Dont skip pages for userns case

Cyrill Gorcunov gorcunov at openvz.org
Fri Apr 29 10:59:35 PDT 2016


Former-patch-by: Andrew Vagin <avagin at openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/mem.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/criu/mem.c b/criu/mem.c
index 4d11a8d62a7f..47bc82692692 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -102,7 +102,15 @@ static inline bool should_dump_page(VmaEntry *vmae, u64 pme)
 		return false;
 	if (pme & PME_SWAP)
 		return true;
-	if ((pme & PME_PRESENT) && ((pme & PME_PFRAME_MASK) != kdat.zero_page_pfn))
+	/*
+	 * FIXME For usernamespaces the addresses for page frames are filtered out
+	 *
+	 * pm.show_pfn = file_ns_capable(file, &init_user_ns, CAP_SYS_ADMIN);
+	 *
+	 * so use plain PME_PRESENT for a while. Need to compare with
+	 * zero page under non-userns case only.
+	 */
+	if ((pme & PME_PRESENT))
 		return true;
 
 	return false;
-- 
2.5.5



More information about the CRIU mailing list