[CRIU] [RFC PATCH v2 01/23] lazy-pages: drop code for page fault message flags processing

Mike Rapoport rppt at linux.vnet.ibm.com
Mon Feb 6 03:43:54 PST 2017


The kernel anyways does not really supports any flags for page fault
message and we've used '#if 0' to skip the flags processing. However, we
can just drop this chunk as we anyway will have do some more work than
simply removing '#if 0' to handle UFFD_WP.

Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/uffd.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/criu/uffd.c b/criu/uffd.c
index 516b800..557f112 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -642,21 +642,6 @@ static int handle_page_fault(struct lazy_pages_info *lpi, struct uffd_msg *msg)
 	address = msg->arg.pagefault.address & ~(page_size() - 1);
 	pr_debug("%d: #PF at 0x%llx\n", lpi->pid, address);
 
-#if 0
-	/*
-	 * Until uffd in kernel gets support for write protection,
-	 * flags are always 0, so there is no point to read and print
-	 * them
-	 */
-	{
-	__u64 flags;
-
-	/* Now handle the pages actually requested. */
-	flags = msg.arg.pagefault.flags;
-	pr_debug("msg.arg.pagefault.flags 0x%llx\n", flags);
-	}
-#endif
-
 	ret = uffd_handle_pages(lpi, address, 1, PR_ASYNC | PR_ASAP);
 	if (ret < 0) {
 		pr_err("Error during regular page copy\n");
-- 
1.9.1



More information about the CRIU mailing list